diff options
173 files changed, 3489 insertions, 5553 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt index 9df072e937..5f209a6675 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -25,7 +25,6 @@ Aimee Trescothick  	VWR-3903  	VWR-4083  	VWR-4106 -	VWR-5308  	VWR-6348  	VWR-6358  	VWR-6360 @@ -150,10 +149,6 @@ blino Nakamura  	VWR-17  Boroondas Gupte  	SNOW-278 -	SNOW-503 -	SNOW-510 -	SNOW-527 -	SNOW-624  	VWR-233  	WEB-262  Bulli Schumann @@ -189,8 +184,6 @@ Dale Glass  	VWR-2502  	VWR-1358  	VWR-2041 -Drew Dri -	VWR-19683  Drewan Keats  	VWR-28  	VWR-248 @@ -259,7 +252,6 @@ Gigs Taggart  	VWR-2491  	VWR-2502  	VWR-2331 -	VWR-5308  	VWR-8781  	VWR-8783  Ginko Bayliss @@ -331,8 +323,6 @@ Khyota Wulluf  	VWR-8885  	VWR-9256  	VWR-9966 -Kitty Barnett -	VWR-19699  Kunnis Basiat  	VWR-82  	VWR-102 @@ -521,20 +511,11 @@ Ringo Tuxing  Robin Cornelius  	SNOW-108  	SNOW-204 -	SNOW-484 -	SNOW-504 -	SNOW-506 -	SNOW-507 -	SNOW-511 -	SNOW-514 -	SNOW-520 -	SNOW-585  	VWR-2488  	VWR-9557  	VWR-11128  	VWR-12533  	VWR-12587 -	VWR-12758  	VWR-12763  	VWR-12995  Ryozu Kojima @@ -608,8 +589,6 @@ Strife Onizuka  	VWR-2265  	VWR-4111  Tayra Dagostino -	SNOW-517 -	SNOW-543  	VWR-13947  TBBle Kurosawa  	VWR-938 @@ -617,22 +596,18 @@ TBBle Kurosawa  	VWR-942  	VWR-944  	VWR-945 -	SNOW-543  	VWR-1891  	VWR-1892  Teardrops Fall  	VWR-5366  Techwolf Lupindo  	SNOW-92 -	SNOW-649  	VWR-12385  tenebrous pau  	VWR-247  Tharax Ferraris  	VWR-605  Thickbrick Sleaford -	SNOW-207 -	SNOW-743  	VWR-7109  	VWR-9287  	VWR-13483 diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index db0b44eb8f..bfaf3f4f26 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -75,11 +75,33 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")  if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")    set(DARWIN 1) -  # set this dynamically from the build system now - -  # NOTE: wont have a distributable build unless you add this on the configure line with: + +  # NOTE: If specifying a different SDK with CMAKE_OSX_SYSROOT at configure +  # time you should also specify CMAKE_OSX_DEPLOYMENT_TARGET explicitly, +  # otherwise CMAKE_OSX_SYSROOT will be overridden here. We can't just check +  # for it being unset, as it gets set to the system default :( + +  # Default to building against the 10.4 SDK if no deployment target is +  # specified. +  if (NOT CMAKE_OSX_DEPLOYMENT_TARGET) +    # NOTE: setting -isysroot is NOT adequate: http://lists.apple.com/archives/Xcode-users/2007/Oct/msg00696.html +    # see http://public.kitware.com/Bug/view.php?id=9959 + poppy +    set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk) +    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.4) +  endif (NOT CMAKE_OSX_DEPLOYMENT_TARGET) + +  # GCC 4.2 is incompatible with the MacOSX 10.4 SDK +  if (${CMAKE_OSX_SYSROOT} MATCHES "10.4u") +    set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.0") +  endif (${CMAKE_OSX_SYSROOT} MATCHES "10.4u") + +  # NOTE: To attempt an i386/PPC Universal build, add this on the configure line:    # -DCMAKE_OSX_ARCHITECTURES:STRING='i386;ppc' -  #set(CMAKE_OSX_ARCHITECTURES i386;ppc) -  set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk) +  # Build only for i386 by default, system default on MacOSX 10.6 is x86_64 +  if (NOT CMAKE_OSX_ARCHITECTURES) +    set(CMAKE_OSX_ARCHITECTURES i386) +  endif (NOT CMAKE_OSX_ARCHITECTURES) +    if (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")      set(ARCH universal)    else (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc") @@ -89,6 +111,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")        set(ARCH i386)      endif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")    endif (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc") +    set(LL_ARCH ${ARCH}_darwin)    set(LL_ARCH_DIR universal-darwin)    set(WORD_SIZE 32) diff --git a/indra/integration_tests/llui_libtest/llwidgetreg.cpp b/indra/integration_tests/llui_libtest/llwidgetreg.cpp index b4921faece..57c39243fb 100644 --- a/indra/integration_tests/llui_libtest/llwidgetreg.cpp +++ b/indra/integration_tests/llui_libtest/llwidgetreg.cpp @@ -1,25 +1,31 @@  /**    * @file llwidgetreg.cpp   * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + *  + * Copyright (c) 2002-2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE.   * $/LicenseInfo$   */  #include "linden_common.h" diff --git a/indra/llaudio/llstreamingaudio_fmod.cpp b/indra/llaudio/llstreamingaudio_fmod.cpp index bcdea771a7..fe94688565 100644 --- a/indra/llaudio/llstreamingaudio_fmod.cpp +++ b/indra/llaudio/llstreamingaudio_fmod.cpp @@ -2,25 +2,31 @@   * @file streamingaudio_fmod.cpp   * @brief LLStreamingAudio_FMOD implementation   * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + *  + * Copyright (c) 2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 2a036df06e..3c689930b8 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -9,7 +9,6 @@ include(Linking)  include(Boost)  include(Pth)  include(LLSharedLibs) -include(GoogleBreakpad)  include(GooglePerfTools)  include(Copy3rdPartyLibs) @@ -233,6 +232,7 @@ set(llcommon_HEADER_FILES      metaclasst.h      metaproperty.h      metapropertyt.h +    processor.h      reflective.h      reflectivet.h      roles_constants.h @@ -259,7 +259,6 @@ endif(LLCOMMON_LINK_SHARED)  target_link_libraries(      llcommon -    ${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}      ${APRUTIL_LIBRARIES}      ${APR_LIBRARIES}      ${EXPAT_LIBRARIES} @@ -291,7 +290,6 @@ if (LL_TESTS)    LL_ADD_INTEGRATION_TEST(llframetimer "" "${test_libs}")    LL_ADD_INTEGRATION_TEST(llinstancetracker "" "${test_libs}")    LL_ADD_INTEGRATION_TEST(lllazy "" "${test_libs}") -  LL_ADD_INTEGRATION_TEST(llprocessor "" "${test_libs}")    LL_ADD_INTEGRATION_TEST(llrand "" "${test_libs}")    LL_ADD_INTEGRATION_TEST(llsdserialize "" "${test_libs}")    LL_ADD_INTEGRATION_TEST(llstring "" "${test_libs}") diff --git a/indra/llcommon/llcommonutils.cpp b/indra/llcommon/llcommonutils.cpp index d82554c202..0022dc6915 100644 --- a/indra/llcommon/llcommonutils.cpp +++ b/indra/llcommon/llcommonutils.cpp @@ -2,25 +2,30 @@   * @file llcommonutils.h   * @brief Commin utils   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + *   * 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 + * 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$   */ diff --git a/indra/llcommon/llcommonutils.h b/indra/llcommon/llcommonutils.h index 755dc41fb4..ad0d884e37 100644 --- a/indra/llcommon/llcommonutils.h +++ b/indra/llcommon/llcommonutils.h @@ -2,25 +2,30 @@   * @file llcommonutils.h   * @brief Common utils   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + *   * 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 + * 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$   */ diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 08d35f9ae7..c1536e85de 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -16,7 +16,6 @@ include_directories(  if (DARWIN)      include(CMakeFindFrameworks)      find_library(CARBON_LIBRARY Carbon) -    find_library(COCOA_LIBRARY Cocoa)  endif (DARWIN) @@ -26,22 +25,6 @@ set(SLPlugin_SOURCE_FILES      slplugin.cpp      ) -if (DARWIN) -  list(APPEND SLPlugin_SOURCE_FILES -    slplugin-objc.mm -  ) -  list(APPEND SLPlugin_HEADER_FILES -    slplugin-objc.h -  ) -endif (DARWIN) - -set_source_files_properties(${SLPlugin_HEADER_FILES} -                            PROPERTIES HEADER_FILE_ONLY TRUE) - -if (SLPlugin_HEADER_FILES) -  list(APPEND SLPlugin_SOURCE_FILES ${SLPlugin_HEADER_FILES}) -endif (SLPlugin_HEADER_FILES) -  add_executable(SLPlugin      WIN32      MACOSX_BUNDLE @@ -68,7 +51,7 @@ add_dependencies(SLPlugin  if (DARWIN)    # Mac version needs to link against Carbon -  target_link_libraries(SLPlugin ${CARBON_LIBRARY} ${COCOA_LIBRARY}) +  target_link_libraries(SLPlugin ${CARBON_LIBRARY})    # Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later)    add_custom_command(      TARGET SLPlugin POST_BUILD diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp index 7d69e1c5cd..7d6dde1a58 100644 --- a/indra/llplugin/slplugin/slplugin.cpp +++ b/indra/llplugin/slplugin/slplugin.cpp @@ -4,25 +4,30 @@   *   * @cond   * - * $LicenseInfo:firstyear=2008&license=viewerlgpl$ + * $LicenseInfo:firstyear=2008&license=viewergpl$ + * + * Copyright (c) 2008, Linden Research, Inc. + *   * 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 + * 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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$   *   * @endcond @@ -39,7 +44,6 @@  #if LL_DARWIN  	#include <Carbon/Carbon.h> -	#include "slplugin-objc.h"  #endif  #if LL_DARWIN || LL_LINUX @@ -225,19 +229,10 @@ int main(int argc, char **argv)  	signal(SIGSYS, &crash_handler);		// non-existent system call invoked  #endif -#if LL_DARWIN -	setupCocoa(); -	createAutoReleasePool(); -#endif -  	LLPluginProcessChild *plugin = new LLPluginProcessChild();  	plugin->init(port); -#if LL_DARWIN -		deleteAutoReleasePool(); -#endif -  	LLTimer timer;  	timer.start(); @@ -265,9 +260,6 @@ int main(int argc, char **argv)  #endif  	while(!plugin->isDone())  	{ -#if LL_DARWIN -		createAutoReleasePool(); -#endif  		timer.reset();  		plugin->idle();  #if LL_DARWIN @@ -385,10 +377,6 @@ int main(int argc, char **argv)  	// exception handler such as QuickTime.  	//checkExceptionHandler();  #endif - -#if LL_DARWIN -		deleteAutoReleasePool(); -#endif  	}  	delete plugin; diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 8e78a5fefd..3ecab90756 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -91,7 +91,6 @@ set(llui_SOURCE_FILES      lltextbox.cpp      lltexteditor.cpp      lltextparser.cpp -    lltextutil.cpp      lltextvalidate.cpp      lltransutil.cpp      lltoggleablemenu.cpp @@ -186,7 +185,6 @@ set(llui_HEADER_FILES      lltextbox.h      lltexteditor.h      lltextparser.h -    lltextutil.h      lltextvalidate.h      lltoggleablemenu.h      lltooltip.h @@ -240,12 +238,10 @@ target_link_libraries(llui      ${LLCOMMON_LIBRARIES} # must be after llimage, llwindow, llrender      ) -if(LL_TESTS) -  # Add tests -  include(LLAddBuildTest) -  SET(llui_TEST_SOURCE_FILES -      llurlmatch.cpp -      llurlentry.cpp -      ) -  LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}") -endif(LL_TESTS) +# Add tests +include(LLAddBuildTest) +SET(llui_TEST_SOURCE_FILES +    llurlmatch.cpp +    llurlentry.cpp +    ) +LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}") diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index cdcf780d2e..5d1d57cbb2 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -329,14 +329,34 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view)  	LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(view);  	if(!accordion_tab)  		return; -	if(std::find(getChildList()->begin(),getChildList()->end(),accordion_tab) == getChildList()->end()) +	if(std::find(beginChild(), endChild(), accordion_tab) == endChild())  		addChild(accordion_tab);  	mAccordionTabs.push_back(accordion_tab); -	 +  	accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLAccordionCtrl::onCollapseCtrlCloseOpen, this, mAccordionTabs.size() - 1) );  } +void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view) +{ +	LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(view); +	if(!accordion_tab) +		return; + +	if(std::find(beginChild(), endChild(), accordion_tab) != endChild()) +		removeChild(accordion_tab); + +	for (std::vector<LLAccordionCtrlTab*>::iterator iter = mAccordionTabs.begin(); +			iter != mAccordionTabs.end(); ++iter) +	{ +		if (accordion_tab == (*iter)) +		{ +			mAccordionTabs.erase(iter); +			break; +		} +	} +} +  void	LLAccordionCtrl::arrangeSinge()  {  	S32 panel_left = BORDER_MARGIN;	  // Margin from left side of Splitter @@ -648,15 +668,23 @@ S32	LLAccordionCtrl::notifyParent(const LLSD& info)  				LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);  				if(accordion_tab->hasFocus() && i>0)  				{ +					bool prev_visible_tab_found = false;  					while(i>0)  					{  						if(mAccordionTabs[--i]->getVisible()) +						{ +							prev_visible_tab_found = true;  							break; +						} +					} + +					if (prev_visible_tab_found) +					{ +						accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]); +						accordion_tab->notify(LLSD().with("action","select_last")); +						return 1;  					} -					 -					accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]); -					accordion_tab->notify(LLSD().with("action","select_last")); -					return 1; +					break;  				}  			}  			return 0; diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h index e2de4b9d3b..ab7d6548ca 100644 --- a/indra/llui/llaccordionctrl.h +++ b/indra/llui/llaccordionctrl.h @@ -2,25 +2,31 @@   * @file LLAccordionCtrl.h   * @brief Accordion Panel implementation   * - * $LicenseInfo:firstyear=2004&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2004&license=viewergpl$ + *  + * Copyright (c) 2004-2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ @@ -28,7 +34,6 @@  #define LL_ACCORDIONCTRL_H  #include "llpanel.h" -#include "lltextbox.h"  #include "llscrollbar.h"  #include <vector> @@ -51,19 +56,6 @@ private:  public: -	/** -	 * Abstract comparator for accordion tabs. -	 */ -	class LLTabComparator -	{ -	public: -		LLTabComparator() {}; -		virtual ~LLTabComparator() {}; - -		/** Returns true if tab1 < tab2, false otherwise */ -		virtual bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const = 0; -	}; -  	struct Params   		: public LLInitParam::Block<Params, LLPanel::Params>  	{ @@ -72,14 +64,10 @@ public:  								accordion tabs are responsible for scrolling their content.  								*NOTE fit_parent works best when combined with single_expansion.  								Accordion view should implement getRequiredRect() and provide valid height*/ -		Optional<LLTextBox::Params>	no_matched_tabs_text; -		Optional<LLTextBox::Params>	no_visible_tabs_text;  		Params()  			: single_expansion("single_expansion",false)  			, fit_parent("fit_parent", false) -			, no_matched_tabs_text("no_matched_tabs_text") -			, no_visible_tabs_text("no_visible_tabs_text")  		{};  	}; @@ -116,31 +104,8 @@ public:  	S32		notifyParent(const LLSD& info);  	void	reset		(); -	void	expandDefaultTab(); - -	void	setComparator(const LLTabComparator* comp) { mTabComparator = comp; } -	void	sort(); - -	/** -	 * Sets filter substring as a search_term for help text when there are no any visible tabs. -	 */ -	void	setFilterSubString(const std::string& filter_string); - -	/** -	 * This method returns the first expanded accordion tab. -	 * It is expected to be called for accordion which doesn't allow multiple -	 * tabs to be expanded. Use with care. -	 */ -	const LLAccordionCtrlTab* getExpandedTab() const; - -	const LLAccordionCtrlTab* getSelectedTab() const { return mSelectedTab; } - -	bool getFitParent() const {return mFitParent;}  private: -	void	initNoTabsWidget(const LLTextBox::Params& tb_params); -	void	updateNoTabsHelpTextVisibility(); -  	void	arrangeSinge();  	void	arrangeMultiple(); @@ -158,21 +123,6 @@ private:  	BOOL	autoScroll				(S32 x, S32 y); -	/** -	 * An adaptor for LLTabComparator -	 */ -	struct LLComparatorAdaptor -	{ -		LLComparatorAdaptor(const LLTabComparator& comparator) : mComparator(comparator) {}; - -		bool operator()(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) -		{ -			return mComparator.compare(tab1, tab2); -		} - -		const LLTabComparator& mComparator; -	}; -  private:  	LLRect			mInnerRect;  	LLScrollbar*	mScrollbar; @@ -180,13 +130,6 @@ private:  	bool			mFitParent;  	bool			mAutoScrolling;  	F32				mAutoScrollRate; -	LLTextBox*		mNoVisibleTabsHelpText; - -	std::string		mNoMatchedTabsOrigString; -	std::string		mNoVisibleTabsOrigString; - -	LLAccordionCtrlTab*		mSelectedTab; -	const LLTabComparator*	mTabComparator;  }; diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index dfb427f293..3c706ce90e 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -425,6 +425,9 @@ bool LLAccordionCtrlTab::addChild(LLView* child, S32 tab_group)  			setDisplayChildren(getDisplayChildren());	  	} +	if (!mContainerPanel) +		mContainerPanel = findContainerView(); +  	return res;  } @@ -551,7 +554,8 @@ S32	LLAccordionCtrlTab::notifyParent(const LLSD& info)  			}  			//LLAccordionCtrl should rearrange accodion tab if one of accordion change its size -			getParent()->notifyParent(info); +			if (getParent()) // A parent may not be set if tabs are added dynamically. +				getParent()->notifyParent(info);  			return 1;  		}  		else if(str_action == "select_prev")  diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 33c6a8b6ac..0255061b12 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -1003,6 +1003,11 @@ void LLButton::setImageDisabledSelected(LLPointer<LLUIImage> image)  	mFadeWhenDisabled = TRUE;  } +void LLButton::setImagePressed(LLPointer<LLUIImage> image) +{ +	mImagePressed = image; +} +  void LLButton::setImageHoverSelected(LLPointer<LLUIImage> image)  {  	mImageHoverSelected = image; diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 2d5fefa78c..a4d81ed6c3 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -2,25 +2,31 @@   * @file llbutton.h   * @brief Header for buttons   * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2001&license=viewergpl$ + *  + * Copyright (c) 2001-2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ @@ -78,7 +84,6 @@ public:  								image_hover_unselected,  								image_disabled_selected,  								image_disabled, -								image_flash,  								image_pressed,  								image_pressed_selected,  								image_overlay; @@ -146,7 +151,6 @@ public:  	virtual BOOL	handleHover(S32 x, S32 y, MASK mask);  	virtual BOOL	handleRightMouseDown(S32 x, S32 y, MASK mask);  	virtual BOOL	handleRightMouseUp(S32 x, S32 y, MASK mask);	 -	virtual BOOL	handleDoubleClick(S32 x, S32 y, MASK mask);  	virtual void	draw();  	/*virtual*/ BOOL postBuild(); @@ -224,8 +228,6 @@ public:  	void			setFont(const LLFontGL *font)		  		{ mGLFont = ( font ? font : LLFontGL::getFontSansSerif()); } -	const LLFontGL* getFont() const { return mGLFont; } -  	S32				getLastDrawCharsCount() const { return mLastDrawCharsCount; } @@ -244,7 +246,6 @@ public:  	void			setImageHoverUnselected(LLPointer<LLUIImage> image);  	void			setImageDisabled(LLPointer<LLUIImage> image);  	void			setImageDisabledSelected(LLPointer<LLUIImage> image); -	void			setImageFlash(LLPointer<LLUIImage> image);  	void			setImagePressed(LLPointer<LLUIImage> image);  	void			setCommitOnReturn(BOOL commit) { mCommitOnReturn = commit; } @@ -309,11 +310,6 @@ private:  	LLPointer<LLUIImage>		mImagePressed;  	LLPointer<LLUIImage>		mImagePressedSelected; -	/* There are two ways an image can flash- by making changes in color according to flash_color attribute -	   or by changing icon from current to the one specified in image_flash. Second way is used only if -	   flash icon name is set in attributes(by default it isn't). First way is used otherwise. */ -	LLPointer<LLUIImage>		mImageFlash; -  	LLUIColor					mHighlightColor;  	LLUIColor					mFlashBgColor; diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 990bf5cd22..ec247b25c3 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -744,12 +744,18 @@ LLRect LLFlatListView::getLastSelectedItemRect()  void LLFlatListView::selectFirstItem	()  { +	// No items - no actions! +	if (mItemPairs.empty()) return; +  	selectItemPair(mItemPairs.front(), true);  	ensureSelectedVisible();  }  void LLFlatListView::selectLastItem		()  { +	// No items - no actions! +	if (mItemPairs.empty()) return; +  	selectItemPair(mItemPairs.back(), true);  	ensureSelectedVisible();  } @@ -1141,12 +1147,17 @@ LLFlatListViewEx::LLFlatListViewEx(const Params& p)  } -void LLFlatListViewEx::updateNoItemsMessage(bool items_filtered) +void LLFlatListViewEx::updateNoItemsMessage(const std::string& filter_string)  { +	bool items_filtered = !filter_string.empty();  	if (items_filtered)  	{  		// items were filtered -		setNoItemsCommentText(mNoFilteredItemsMsg); +		LLStringUtil::format_map_t args; +		args["[SEARCH_TERM]"] = LLURI::escape(filter_string); +		std::string text = mNoFilteredItemsMsg; +		LLStringUtil::format(text, args); +		setNoItemsCommentText(text);  	}  	else  	{ diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index f7d094f7e7..4f718ab0dc 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -470,10 +470,10 @@ protected:  	/**  	 * Applies a message for empty list depend on passed argument.  	 * -	 * @param items_filtered - if true message for filtered items will be set, otherwise for -	 * completely empty list. +	 * @param filter_string - if is not empty, message for filtered items will be set, otherwise for +	 * completely empty list. Value of filter string will be passed as search_term in SLURL.  	 */ -	void updateNoItemsMessage(bool items_filtered); +	void updateNoItemsMessage(const std::string& filter_string);  private:  	std::string mNoFilteredItemsMsg; diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 403723d9d8..444711de81 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -432,11 +432,15 @@ private:  class LLFloaterView : public LLUICtrl  { +public: +	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>{}; +  protected:  	LLFloaterView (const Params& p);  	friend class LLUICtrlFactory;  public: +  	/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);  	void reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical); diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h index 79a8b0fb28..7e37600409 100644 --- a/indra/llui/lliconctrl.h +++ b/indra/llui/lliconctrl.h @@ -2,25 +2,31 @@   * @file lliconctrl.h   * @brief LLIconCtrl base class   * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2001&license=viewergpl$ + *  + * Copyright (c) 2001-2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 843f72d8e4..45f9de8e8d 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1440,7 +1440,7 @@ BOOL LLLineEditor::handleUnicodeCharHere(llwchar uni_char)  BOOL LLLineEditor::canDoDelete() const  { -	return ( !mReadOnly && (!mPassDelete || (hasSelection() || (getCursor() < mText.length()))) ); +	return ( !mReadOnly && mText.length() > 0 && (!mPassDelete || (hasSelection() || (getCursor() < mText.length()))) );  }  void LLLineEditor::doDelete() diff --git a/indra/llui/llloadingindicator.cpp b/indra/llui/llloadingindicator.cpp index 7b29d92ea0..f8b029e19c 100644 --- a/indra/llui/llloadingindicator.cpp +++ b/indra/llui/llloadingindicator.cpp @@ -2,25 +2,31 @@   * @file llloadingindicator.cpp   * @brief Perpetual loading indicator   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2010&license=viewergpl$ + *  + * 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ @@ -35,8 +41,7 @@  #include "lluictrlfactory.h"  #include "lluiimage.h" -// registered in llui.cpp to avoid being left out by MS linker -//static LLDefaultChildRegistry::Register<LLLoadingIndicator> r("loading_indicator"); +static LLDefaultChildRegistry::Register<LLLoadingIndicator> r("loading_indicator");  ///////////////////////////////////////////////////////////////////////////////  // LLLoadingIndicator::Data class diff --git a/indra/llui/llloadingindicator.h b/indra/llui/llloadingindicator.h index 4e4a224ef6..32dd1fead8 100644 --- a/indra/llui/llloadingindicator.h +++ b/indra/llui/llloadingindicator.h @@ -2,25 +2,31 @@   * @file llloadingindicator.h   * @brief Perpetual loading indicator   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2010&license=viewergpl$ + *  + * 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 65ef53443b..7b8f51ae3c 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -48,122 +48,38 @@  const std::string NOTIFICATION_PERSIST_VERSION = "0.93"; -// local channel for notification history -class LLNotificationHistoryChannel : public LLNotificationChannel +// Local channel for persistent notifications +// Stores only persistent notifications. +// Class users can use connectChanged() to process persistent notifications +// (see LLNotificationStorage for example). +class LLPersistentNotificationChannel : public LLNotificationChannel  { -	LOG_CLASS(LLNotificationHistoryChannel); +	LOG_CLASS(LLPersistentNotificationChannel);  public: -	LLNotificationHistoryChannel(const std::string& filename) :  -		LLNotificationChannel("History", "Visible", &historyFilter, LLNotificationComparators::orderByUUID()), -		mFileName(filename) +	LLPersistentNotificationChannel() : +		LLNotificationChannel("Persistent", "Visible", ¬ificationFilter, LLNotificationComparators::orderByUUID())  	{ -		connectChanged(boost::bind(&LLNotificationHistoryChannel::historyHandler, this, _1)); -		loadPersistentNotifications();  	}  private: -	bool historyHandler(const LLSD& payload) -	{ -		// we ignore "load" messages, but rewrite the persistence file on any other -		std::string sigtype = payload["sigtype"]; -		if (sigtype != "load") -		{ -			savePersistentNotifications(); -		} -		return false; -	} - -	// The history channel gets all notifications except those that have been cancelled -	static bool historyFilter(LLNotificationPtr pNotification) -	{ -		return !pNotification->isCancelled(); -	} -	void savePersistentNotifications() +	// The channel gets all persistent notifications except those that have been canceled +	static bool notificationFilter(LLNotificationPtr pNotification)  	{ -		/* NOTE: As of 2009-11-09 the reload of notifications on startup does not -		work, and has not worked for months.  Skip saving notifications until the -		read can be fixed, because this hits the disk once per notification and -		causes log spam.  James - -		llinfos << "Saving open notifications to " << mFileName << llendl; +		bool handle_notification = false; -		llofstream notify_file(mFileName.c_str()); -		if (!notify_file.is_open())  -		{ -			llwarns << "Failed to open " << mFileName << llendl; -			return; -		} - -		LLSD output; -		output["version"] = NOTIFICATION_PERSIST_VERSION; -		LLSD& data = output["data"]; - -		for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it) -		{ -			if (!LLNotifications::instance().templateExists((*it)->getName())) continue; +		handle_notification = pNotification->isPersistent() +			&& !pNotification->isCancelled(); -			// only store notifications flagged as persisting -			LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate((*it)->getName()); -			if (!templatep->mPersist) continue; - -			data.append((*it)->asLLSD()); -		} - -		LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); -		formatter->format(output, notify_file, LLSDFormatter::OPTIONS_PRETTY); -		*/ +		return handle_notification;  	} -	void loadPersistentNotifications() -	{ -		llinfos << "Loading open notifications from " << mFileName << llendl; - -		llifstream notify_file(mFileName.c_str()); -		if (!notify_file.is_open())  -		{ -			llwarns << "Failed to open " << mFileName << llendl; -			return; -		} - -		LLSD input; -		LLPointer<LLSDParser> parser = new LLSDXMLParser(); -		if (parser->parse(notify_file, input, LLSDSerialize::SIZE_UNLIMITED) < 0) -		{ -			llwarns << "Failed to parse open notifications" << llendl; -			return; -		} - -		if (input.isUndefined()) return; -		std::string version = input["version"]; -		if (version != NOTIFICATION_PERSIST_VERSION) -		{ -			llwarns << "Bad open notifications version: " << version << llendl; -			return; -		} -		LLSD& data = input["data"]; -		if (data.isUndefined()) return; - -		LLNotifications& instance = LLNotifications::instance(); -		for (LLSD::array_const_iterator notification_it = data.beginArray(); -			notification_it != data.endArray(); -			++notification_it) -		{ -			instance.add(LLNotificationPtr(new LLNotification(*notification_it))); -		} -	} - -	//virtual  	void onDelete(LLNotificationPtr pNotification)  	{ -		// we want to keep deleted notifications in our log +		// we want to keep deleted notifications in our log, otherwise some  +		// notifications will be lost on exit.  		mItems.insert(pNotification); -		 -		return;  	} -	 -private: -	std::string mFileName;  };  bool filterIgnoredNotifications(LLNotificationPtr notification) @@ -417,6 +333,10 @@ LLNotification::LLNotification(const LLNotification::Params& p) :  		mTemporaryResponder = true;  	} +	else if(p.functor.responder.isChosen()) +	{ +		mResponder = p.functor.responder; +	}  	if(p.responder.isProvided())  	{ @@ -462,6 +382,12 @@ LLSD LLNotification::asLLSD()  	output["priority"] = (S32)mPriority;  	output["responseFunctor"] = mResponseFunctorName;  	output["reusable"] = mIsReusable; + +	if(mResponder) +	{ +		output["responder"] = mResponder->asLLSD(); +	} +  	return output;  } @@ -571,12 +497,20 @@ void LLNotification::respond(const LLSD& response)  	// *TODO may remove mRespondedTo and use mResponce.isDefined() in isRespondedTo()  	mRespondedTo = true;  	mResponse = response; -	// look up the functor -	LLNotificationFunctorRegistry::ResponseFunctor functor =  -		LLNotificationFunctorRegistry::instance().getFunctor(mResponseFunctorName); -	// and then call it -	functor(asLLSD(), response); -	 + +	if(mResponder) +	{ +		mResponder->handleRespond(asLLSD(), response); +	} +	else +	{ +		// look up the functor +		LLNotificationFunctorRegistry::ResponseFunctor functor = +			LLNotificationFunctorRegistry::instance().getFunctor(mResponseFunctorName); +		// and then call it +		functor(asLLSD(), response); +	} +  	if (mTemporaryResponder && !isReusable())  	{  		LLNotificationFunctorRegistry::instance().unregisterFunctor(mResponseFunctorName); @@ -621,6 +555,11 @@ void LLNotification::setResponseFunctor(const LLNotificationFunctorRegistry::Res  	LLNotificationFunctorRegistry::instance().registerFunctor(mResponseFunctorName, cb);  } +void LLNotification::setResponseFunctor(const LLNotificationResponderPtr& responder) +{ +	mResponder = responder; +} +  bool LLNotification::payloadContainsAll(const std::vector<std::string>& required_fields) const  {  	for(std::vector<std::string>::const_iterator required_fields_it = required_fields.begin();  @@ -1116,12 +1055,9 @@ void LLNotifications::createDefaultChannels()  	LLNotificationChannel::buildChannel("Visible", "Ignore",  		&LLNotificationFilters::includeEverything); -	// create special history channel -	//std::string notifications_log_file = gDirUtilp->getExpandedFilename ( LL_PATH_PER_SL_ACCOUNT, "open_notifications.xml" ); -	// use ^^^ when done debugging notifications serialization -	std::string notifications_log_file = gDirUtilp->getExpandedFilename ( LL_PATH_USER_SETTINGS, "open_notifications.xml" ); +	// create special persistent notification channel  	// this isn't a leak, don't worry about the empty "new" -	new LLNotificationHistoryChannel(notifications_log_file); +	new LLPersistentNotificationChannel();  	// connect action methods to these channels  	LLNotifications::instance().getChannel("Expiration")-> diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 1799ca65b7..c942a32512 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -116,8 +116,23 @@ typedef enum e_notification_priority  	NOTIFICATION_PRIORITY_CRITICAL  } ENotificationPriority; +class LLNotificationResponderInterface +{ +public: +	LLNotificationResponderInterface(){}; +	virtual ~LLNotificationResponderInterface(){}; + +	virtual void handleRespond(const LLSD& notification, const LLSD& response) = 0; + +	virtual LLSD asLLSD() = 0; + +	virtual void fromLLSD(const LLSD& params) = 0; +}; +  typedef boost::function<void (const LLSD&, const LLSD&)> LLNotificationResponder; +typedef boost::shared_ptr<LLNotificationResponderInterface> LLNotificationResponderPtr; +  typedef LLFunctorRegistry<LLNotificationResponder> LLNotificationFunctorRegistry;  typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegistration; @@ -303,10 +318,12 @@ public:  		{  			Alternative<std::string>										name;  			Alternative<LLNotificationFunctorRegistry::ResponseFunctor>	function; +			Alternative<LLNotificationResponderPtr>						responder;  			Functor()  			:	name("functor_name"), -				function("functor") +				function("functor"), +				responder("responder")  			{}  		};  		Optional<Functor>						functor; @@ -349,12 +366,13 @@ private:  	bool mIgnored;  	ENotificationPriority mPriority;  	LLNotificationFormPtr mForm; -	void* mResponderObj; +	void* mResponderObj; // TODO - refactor/remove this field  	bool mIsReusable; -	 +	LLNotificationResponderPtr mResponder; +  	// a reference to the template  	LLNotificationTemplatePtr mTemplatep; -	 +  	/*  	 We want to be able to store and reload notifications so that they can survive  	 a shutdown/restart of the client. So we can't simply pass in callbacks; @@ -393,6 +411,8 @@ public:  	void setResponseFunctor(const LLNotificationFunctorRegistry::ResponseFunctor& cb); +	void setResponseFunctor(const LLNotificationResponderPtr& responder); +  	typedef enum e_response_template_type  	{  		WITHOUT_DEFAULT_BUTTON, @@ -459,7 +479,12 @@ public:  	{  		return mTemplatep->mName;  	} -	 + +	bool isPersistent() const +	{ +		return mTemplatep->mPersist; +	} +  	const LLUUID& id() const  	{  		return mId; diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index db0f2bd6e2..94eade06ad 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -282,6 +282,8 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)  	text_p.border_visible(false);  	text_p.rect(mItemListRect);  	text_p.follows.flags(FOLLOWS_ALL); +	// word wrap was added accroding to the EXT-6841 +	text_p.wrap(true);  	addChild(LLUICtrlFactory::create<LLTextBox>(text_p));  } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index e08026eaf4..390ec234d3 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1507,6 +1507,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url)  	registrar.add("Url.OpenExternal", boost::bind(&LLUrlAction::openURLExternal, url));  	registrar.add("Url.Execute", boost::bind(&LLUrlAction::executeSLURL, url));  	registrar.add("Url.Teleport", boost::bind(&LLUrlAction::teleportToLocation, url)); +	registrar.add("Url.ShowProfile", boost::bind(&LLUrlAction::showProfile, url));  	registrar.add("Url.ShowOnMap", boost::bind(&LLUrlAction::showLocationOnMap, url));  	registrar.add("Url.CopyLabel", boost::bind(&LLUrlAction::copyLabelToClipboard, url));  	registrar.add("Url.CopyUrl", boost::bind(&LLUrlAction::copyURLToClipboard, url)); diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index f9a4ed7285..bf12384a28 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -56,6 +56,7 @@  #include "llfloaterreg.h"  #include "llmenugl.h"  #include "llmenubutton.h" +#include "llloadingindicator.h"  #include "llwindow.h"  // for registration @@ -94,7 +95,10 @@ std::list<std::string> gUntranslated;  static LLDefaultChildRegistry::Register<LLFilterEditor> register_filter_editor("filter_editor");  static LLDefaultChildRegistry::Register<LLFlyoutButton> register_flyout_button("flyout_button");  static LLDefaultChildRegistry::Register<LLSearchEditor> register_search_editor("search_editor"); + +// register other widgets which otherwise may not be linked in  static LLDefaultChildRegistry::Register<LLMenuButton> register_menu_button("menu_button"); +static LLDefaultChildRegistry::Register<LLLoadingIndicator> register_loading_indicator("loading_indicator");  // diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 15a382660e..930dadc377 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -2,25 +2,31 @@   * @file lluictrlfactory.cpp   * @brief Factory class for creating UI controls   * - * $LicenseInfo:firstyear=2003&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2003&license=viewergpl$ + *  + * Copyright (c) 2003-2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ @@ -95,9 +101,7 @@ void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitPa  	if (LLUICtrlFactory::getLayeredXMLNode(filename, root_node))  	{ -		LLUICtrlFactory::instance().pushFileName(filename);  		LLXUIParser::instance().readXUI(root_node, block, filename); -		LLUICtrlFactory::instance().popFileName();  	}  } @@ -207,7 +211,7 @@ bool LLUICtrlFactory::buildFloater(LLFloater* floaterp, const std::string& filen  	bool res = true;  	lldebugs << "Building floater " << filename << llendl; -	pushFileName(filename); +	mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), filename));  	{  		if (!floaterp->getFactoryMap().empty())  		{ @@ -218,7 +222,7 @@ bool LLUICtrlFactory::buildFloater(LLFloater* floaterp, const std::string& filen  		floaterp->getCommitCallbackRegistrar().pushScope();  		floaterp->getEnableCallbackRegistrar().pushScope(); -		res = floaterp->initFloaterXML(root, floaterp->getParent(), filename, output_node); +		res = floaterp->initFloaterXML(root, floaterp->getParent(), output_node);  		floaterp->setXMLFilename(filename); @@ -230,7 +234,7 @@ bool LLUICtrlFactory::buildFloater(LLFloater* floaterp, const std::string& filen  			mFactoryStack.pop_front();  		}  	} -	popFileName(); +	mFileNames.pop_back();  	return res;  } @@ -279,7 +283,7 @@ BOOL LLUICtrlFactory::buildPanel(LLPanel* panelp, const std::string& filename, L  	lldebugs << "Building panel " << filename << llendl; -	pushFileName(filename); +	mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), filename));  	{  		if (!panelp->getFactoryMap().empty())  		{ @@ -302,7 +306,7 @@ BOOL LLUICtrlFactory::buildPanel(LLPanel* panelp, const std::string& filename, L  			mFactoryStack.pop_front();  		}  	} -	popFileName(); +	mFileNames.pop_back();  	return didPost;  } @@ -360,23 +364,6 @@ LLPanel* LLUICtrlFactory::createFactoryPanel(const std::string& name)  	return create<LLPanel>(panel_p);  } -std::string LLUICtrlFactory::getCurFileName()  -{  -	return mFileNames.empty() ? "" : gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + mFileNames.back();  -} - - -void LLUICtrlFactory::pushFileName(const std::string& name)  -{  -	mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), name));  -} - -void LLUICtrlFactory::popFileName()  -{  -	mFileNames.pop_back();  -} - -  //-----------------------------------------------------------------------------  //static @@ -446,22 +433,14 @@ void LLUICtrlFactory::registerWidget(const std::type_info* widget_type, const st  {  	// associate parameter block type with template .xml file  	std::string* existing_tag = LLWidgetNameRegistry::instance().getValue(param_block_type); -	if (existing_tag != NULL) +	if (existing_tag != NULL && *existing_tag != tag)  	{ -		if(*existing_tag != tag) -		{ -			std::cerr << "Duplicate entry for T::Params, try creating empty param block in derived classes that inherit T::Params" << std::endl; -			// forcing crash here -			char* foo = 0; -			*foo = 1; -		} -		else -		{ -			// widget already registered -			return; -		} +		std::cerr << "Duplicate entry for T::Params, try creating empty param block in derived classes that inherit T::Params" << std::endl; +		// forcing crash here +		char* foo = 0; +		*foo = 1;  	} -	LLWidgetNameRegistry::instance().defaultRegistrar().add(param_block_type, tag); +	LLWidgetNameRegistry ::instance().defaultRegistrar().add(param_block_type, tag);  	// associate widget type with factory function  	LLDefaultWidgetRegistry::instance().defaultRegistrar().add(widget_type, creator_func);  	//FIXME: comment this in when working on schema generation diff --git a/indra/llui/lluifwd.h b/indra/llui/lluifwd.h index a68629a091..d6047b943c 100644 --- a/indra/llui/lluifwd.h +++ b/indra/llui/lluifwd.h @@ -2,25 +2,31 @@   * @file lluifwd.h   * @brief Forward declarations of common LLUI widget types.   * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2007&license=viewergpl$ + *  + * Copyright (c) 2007-2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/llui/llurlaction.cpp b/indra/llui/llurlaction.cpp index 42b779bd28..2f13a56b42 100644 --- a/indra/llui/llurlaction.cpp +++ b/indra/llui/llurlaction.cpp @@ -3,25 +3,31 @@   * @author Martin Reddy   * @brief A set of actions that can performed on Urls   * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + *  + * Copyright (c) 2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/llui/llurlaction.h b/indra/llui/llurlaction.h index 0132dbaaf0..b96faf1b3f 100644 --- a/indra/llui/llurlaction.h +++ b/indra/llui/llurlaction.h @@ -3,25 +3,31 @@   * @author Martin Reddy   * @brief A set of actions that can performed on Urls   * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + *  + * Copyright (c) 2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 736de651da..3375c13c94 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -765,3 +765,35 @@ std::string LLUrlEntryNoLink::getLabel(const std::string &url, const LLUrlLabelC  {  	return getUrl(url);  } + +// +// LLUrlEntryIcon describes an icon with <icon>...</icon> tags +// +LLUrlEntryIcon::LLUrlEntryIcon() +{ +	mPattern = boost::regex("<icon\\s*>\\s*([^<]*)?\\s*</icon\\s*>", +							boost::regex::perl|boost::regex::icase); +	mDisabledLink = true; +} + +std::string LLUrlEntryIcon::getUrl(const std::string &url) const +{ +	return LLStringUtil::null; +} + +std::string LLUrlEntryIcon::getLabel(const std::string &url, const LLUrlLabelCallback &cb) +{ +	return LLStringUtil::null; +} + +std::string LLUrlEntryIcon::getIcon(const std::string &url) +{ +	// Grep icon info between <icon>...</icon> tags +	// matches[1] contains the icon name/path +	boost::match_results<std::string::const_iterator> matches; +	mIcon = (boost::regex_match(url, matches, mPattern) && matches[1].matched) +		? matches[1] +		: LLStringUtil::null; +	LLStringUtil::trim(mIcon); +	return mIcon; +} diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 29575d752c..71f030677a 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -77,7 +77,7 @@ public:  	virtual std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb) { return url; }  	/// Return an icon that can be displayed next to Urls of this type -	std::string getIcon() const { return mIcon; } +	virtual std::string getIcon(const std::string &url) { return mIcon; }  	/// Return the color to render the displayed text  	LLUIColor getColor() const { return mColor; } @@ -296,4 +296,17 @@ public:  	/*virtual*/ std::string getUrl(const std::string &string) const;  }; +/// +/// LLUrlEntryIcon describes an icon with <icon>...</icon> tags +/// +class LLUrlEntryIcon : public LLUrlEntryBase +{ +public: +	LLUrlEntryIcon(); +	/*virtual*/ std::string getUrl(const std::string &string) const; +	/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); +	/*virtual*/ std::string getIcon(const std::string &url); +}; + +  #endif diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 0a70aa586a..4341286eb4 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -45,6 +45,7 @@ LLUrlRegistry::LLUrlRegistry()  {  	// Urls are matched in the order that they were registered  	registerUrl(new LLUrlEntryNoLink()); +	registerUrl(new LLUrlEntryIcon());  	registerUrl(new LLUrlEntrySLURL());  	registerUrl(new LLUrlEntryHTTP());  	registerUrl(new LLUrlEntryHTTPLabel()); @@ -135,7 +136,8 @@ static bool stringHasUrl(const std::string &text)  			text.find(".net") != std::string::npos ||  			text.find(".edu") != std::string::npos ||  			text.find(".org") != std::string::npos || -			text.find("<nolink>") != std::string::npos); +			text.find("<nolink>") != std::string::npos || +			text.find("<icon") != std::string::npos);  }  bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LLUrlLabelCallback &cb) @@ -177,7 +179,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL  						match_entry->getUrl(url),  						match_entry->getLabel(url, cb),  						match_entry->getTooltip(url), -						match_entry->getIcon(), +						match_entry->getIcon(url),  						match_entry->getColor(),  						match_entry->getMenuName(),  						match_entry->getLocation(url), diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index b41b0ec5dd..8d3852002c 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -2,25 +2,31 @@   * @file lldir_mac.cpp   * @brief Implementation of directory utilities for Mac OS X   * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2002&license=viewergpl$ + *  + * Copyright (c) 2002-2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index e2da3d1ad8..a96ad7e796 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -2877,8 +2877,13 @@ void LLSplashScreenWin32::updateImpl(const std::string& mesg)  {  	if (!mWindow) return; +	int output_str_len = MultiByteToWideChar(CP_UTF8, 0, mesg.c_str(), mesg.length(), NULL, 0); +	if( output_str_len>1024 ) +		return; +  	WCHAR w_mesg[1024]; -	mbstowcs(w_mesg, mesg.c_str(), 1024); + +	MultiByteToWideChar (CP_UTF8, 0, mesg.c_str(), mesg.length(), w_mesg, output_str_len);  	SendDlgItemMessage(mWindow,  		666,		// HACK: text id diff --git a/indra/mac_updater/mac_updater.cpp b/indra/mac_updater/mac_updater.cpp index e4d100d1ec..44f002aecf 100644 --- a/indra/mac_updater/mac_updater.cpp +++ b/indra/mac_updater/mac_updater.cpp @@ -2,25 +2,31 @@   * @file mac_updater.cpp   * @brief    * - * $LicenseInfo:firstyear=2006&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2006&license=viewergpl$ + *  + * Copyright (c) 2006-2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/media_plugins/webkit/windows_volume_catcher.cpp b/indra/media_plugins/webkit/windows_volume_catcher.cpp index 8debe8fac6..fdff28c2c1 100644 --- a/indra/media_plugins/webkit/windows_volume_catcher.cpp +++ b/indra/media_plugins/webkit/windows_volume_catcher.cpp @@ -33,262 +33,62 @@  #include "volume_catcher.h"  #include <windows.h> +#include "llsingleton.h" -// -// Abstracts a Win32 mixer line and associated state -// for muting and changing volume on a given output -// -class Mixer -{ -public: -	static Mixer* create(U32 index); -	~Mixer(); - -	void setMute(bool mute); -	void setVolume(F32 volume_left, F32 volume_right); - -private: -	// use create(index) to create a Mixer -	Mixer(HMIXER handle, U32 mute_control_id, U32 volume_control_id, U32 min_volume, U32 max_volume); - -	HMIXER	mHandle;		 -	U32		mMuteControlID;		// handle to mixer controller for muting -	U32		mVolumeControlID;	// handle to mixer controller for changing volume -	U32		mMinVolume;			// value that specifies minimum volume as reported by mixer -	U32		mMaxVolume;			// value that specifies maximum volume as reported by mixer -}; - -// factory function that attempts to create a Mixer object associated with a given mixer line index -// returns NULL if creation failed -// static  -Mixer* Mixer::create(U32 index) -{ -	// get handle to mixer object -	HMIXER mixer_handle; -	MMRESULT result = mixerOpen( &mixer_handle, -							index,	 -							0,	// HWND to call when state changes - not used -							0,	// user data for callback - not used -							MIXER_OBJECTF_MIXER ); - -	if (result == MMSYSERR_NOERROR) -	{ -		MIXERLINE mixer_line; -		mixer_line.cbStruct = sizeof( MIXERLINE ); - -		// try speakers first -		mixer_line.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_SPEAKERS; - -		MMRESULT result = mixerGetLineInfo( reinterpret_cast< HMIXEROBJ >( mixer_handle ), -								&mixer_line, -								MIXER_OBJECTF_HMIXER | MIXER_GETLINEINFOF_COMPONENTTYPE ); -		if (result != MMSYSERR_NOERROR) -		{	// failed - try headphones next -			mixer_line.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_HEADPHONES; -			result = mixerGetLineInfo( reinterpret_cast< HMIXEROBJ >( mixer_handle ), -									&mixer_line, -									MIXER_OBJECTF_HMIXER | MIXER_GETLINEINFOF_COMPONENTTYPE ); -		} - -		if (result == MMSYSERR_NOERROR) -		{	// successfully found mixer line object, now use it to get volume and mute controls - -			// reuse these objects to query for both volume and mute controls -			MIXERCONTROL mixer_control; -			MIXERLINECONTROLS mixer_line_controls; -			mixer_line_controls.cbStruct = sizeof( MIXERLINECONTROLS ); -			mixer_line_controls.dwLineID = mixer_line.dwLineID; -			mixer_line_controls.cControls = 1; -			mixer_line_controls.cbmxctrl = sizeof( MIXERCONTROL ); -			mixer_line_controls.pamxctrl = &mixer_control; - -			// first, query for mute -			mixer_line_controls.dwControlType = MIXERCONTROL_CONTROLTYPE_MUTE; - -			// get control id for mute controls -			result = mixerGetLineControls( reinterpret_cast< HMIXEROBJ >( mixer_handle ), -				&mixer_line_controls, -				MIXER_OBJECTF_HMIXER | MIXER_GETLINECONTROLSF_ONEBYTYPE ); -			if (result == MMSYSERR_NOERROR ) -			{	// we have a mute controls.  Remember the mute control id and then query for  -				// volume controls using the same struct, but different dwControlType - -				U32 mute_control_id = mixer_control.dwControlID; -				mixer_line_controls.dwControlType = MIXERCONTROL_CONTROLTYPE_VOLUME; -				result = mixerGetLineControls( reinterpret_cast< HMIXEROBJ >( mixer_handle ), -					&mixer_line_controls, -					MIXER_OBJECTF_HMIXER | MIXER_GETLINECONTROLSF_ONEBYTYPE ); - -				if (result == MMSYSERR_NOERROR) -				{	// we have both mute and volume controls for this mixer, so we're keeping it -					return new Mixer(mixer_handle,  -								mute_control_id,  -								mixer_control.dwControlID,  -								mixer_control.Bounds.dwMinimum,  -								mixer_control.Bounds.dwMaximum); -				} -			} -		} -	} - -	// if we got here, we didn't successfully create a Mixer object -	mixerClose(mixer_handle); -	return NULL; -} - -Mixer::Mixer(HMIXER handle, U32 mute_control_id, U32 volume_control_id, U32 min_volume, U32 max_volume) -:	mHandle(handle), -	mMuteControlID(mute_control_id), -	mVolumeControlID(volume_control_id), -	mMinVolume(min_volume), -	mMaxVolume(max_volume) -{} - -Mixer::~Mixer() -{} - -// toggle mute for this mixer -// if mute is set, then volume level will be ignored -void Mixer::setMute(bool mute) -{ -	MIXERCONTROLDETAILS_BOOLEAN mixer_control_details_bool = { mute }; -	MIXERCONTROLDETAILS mixer_control_details; -	mixer_control_details.cbStruct = sizeof( MIXERCONTROLDETAILS ); -	mixer_control_details.dwControlID = mMuteControlID; -	mixer_control_details.cChannels = 1; -	mixer_control_details.cMultipleItems = 0; -	mixer_control_details.cbDetails = sizeof( MIXERCONTROLDETAILS_BOOLEAN ); -	mixer_control_details.paDetails = &mixer_control_details_bool; - -	mixerSetControlDetails( reinterpret_cast< HMIXEROBJ >( mHandle ), -								 &mixer_control_details, -								 MIXER_OBJECTF_HMIXER | MIXER_SETCONTROLDETAILSF_VALUE ); -} - -// set individual volume levels for left and right channels -// if mute is set, then these values will apply once mute is unset -void Mixer::setVolume(F32 volume_left, F32 volume_right) -{ -	// assuming pan is in range [-1, 1] set volume levels accordingly -	// if pan == -1 then	volume_left_mixer = volume_left	&& volume_right_mixer = 0 -	// if pan == 0 then		volume_left_mixer = volume_left	&& volume_right_mixer = volume_right -	// if pan == 1 then		volume_left_mixer = 0			&& volume_right_mixer = volume_right -	U32 volume_left_mixer = (U32) -							((F32)mMinVolume  -								+ (volume_left * ((F32)mMaxVolume - (F32)mMinVolume))); -	U32 volume_right_mixer = (U32) -							((F32)mMinVolume  -								+ (volume_right * ((F32)mMaxVolume - (F32)mMinVolume))); - -	// pass volume levels on to mixer -	MIXERCONTROLDETAILS_UNSIGNED mixer_control_details_unsigned[ 2 ] = { volume_left_mixer, volume_right_mixer }; -	MIXERCONTROLDETAILS mixer_control_details; -	mixer_control_details.cbStruct = sizeof( MIXERCONTROLDETAILS ); -	mixer_control_details.dwControlID = mVolumeControlID; -	mixer_control_details.cChannels = 2; -	mixer_control_details.cMultipleItems = 0; -	mixer_control_details.cbDetails = sizeof( MIXERCONTROLDETAILS_UNSIGNED ); -	mixer_control_details.paDetails = &mixer_control_details_unsigned; - -	mixerSetControlDetails( reinterpret_cast< HMIXEROBJ >( mHandle ), -								 &mixer_control_details, -								 MIXER_OBJECTF_HMIXER | MIXER_SETCONTROLDETAILSF_VALUE ); -} - -class VolumeCatcherImpl +class VolumeCatcherImpl : public LLSingleton<VolumeCatcherImpl>  { +friend LLSingleton<VolumeCatcherImpl>;  public:  	void setVolume(F32 volume);  	void setPan(F32 pan); -	static VolumeCatcherImpl *getInstance();  private:  	// This is a singleton class -- both callers and the component implementation should use getInstance() to find the instance.  	VolumeCatcherImpl();  	~VolumeCatcherImpl(); -	static VolumeCatcherImpl *sInstance; -	 +	typedef void (*set_volume_func_t)(F32); +	typedef void (*set_mute_func_t)(bool); + +	set_volume_func_t mSetVolumeFunc; +	set_mute_func_t mSetMuteFunc; +  	F32 	mVolume;  	F32 	mPan; -	typedef std::vector<Mixer*> mixer_vector_t; -	mixer_vector_t	mMixers;  }; -VolumeCatcherImpl *VolumeCatcherImpl::sInstance = NULL; - -VolumeCatcherImpl *VolumeCatcherImpl::getInstance() -{ -	if(!sInstance) -	{ -		sInstance = new VolumeCatcherImpl; -	} -	 -	return sInstance; -} -  VolumeCatcherImpl::VolumeCatcherImpl()  :	mVolume(1.0f),	// default volume is max  	mPan(0.f)		// default pan is centered  { -	OSVERSIONINFOEX	V = {sizeof(OSVERSIONINFOEX)};	//EX for NT 5.0 and later - -	::GetVersionEx((POSVERSIONINFO)&V); - -	// disable volume on XP and below -	if (V.dwPlatformId == VER_PLATFORM_WIN32_NT && V.dwMajorVersion >= 6) +	HMODULE handle = ::LoadLibrary(L"winmm.dll"); +	if(handle)  	{ -		// for each reported mixer "device", create a proxy object and add to list -		U32 num_mixers = mixerGetNumDevs(); -		for (U32 mixer_index = 0; mixer_index < num_mixers; ++mixer_index) -		{ -			Mixer* mixerp = Mixer::create(mixer_index); -			if (mixerp) -			{ -				mMixers.push_back(mixerp); -			} -		} +		mSetVolumeFunc = (set_volume_func_t)::GetProcAddress(handle, "setPluginVolume"); +		mSetMuteFunc = (set_mute_func_t)::GetProcAddress(handle, "setPluginMute");  	}  }  VolumeCatcherImpl::~VolumeCatcherImpl()  { -	for(mixer_vector_t::iterator it = mMixers.begin(), end_it = mMixers.end(); -		it != end_it; -		++it) -	{ -		delete *it; -		*it = NULL; -	}  }  void VolumeCatcherImpl::setVolume(F32 volume)  { -	F32 left_volume = volume * min(1.f, 1.f - mPan); -	F32 right_volume = volume * max(0.f, 1.f + mPan); +	//F32 left_volume = volume * min(1.f, 1.f - mPan); +	//F32 right_volume = volume * max(0.f, 1.f + mPan); -	for(mixer_vector_t::iterator it = mMixers.begin(), end_it = mMixers.end(); -		it != end_it; -		++it) -	{	// set volume levels and mute for each mixer -		// note that a muted mixer will ignore this volume level - -		(*it)->setVolume(left_volume, right_volume); -		 -		if (volume == 0.f && mVolume != 0.f) -		{ -			(*it)->setMute(true); -		} -		else if (mVolume == 0.f && volume != 0.f) -		{ -			(*it)->setMute(false); -		} - -	} -  	mVolume = volume; +	if (mSetMuteFunc) +	{ +		mSetMuteFunc(volume == 0.f); +	} +	if (mSetVolumeFunc) +	{ +		mSetVolumeFunc(mVolume); +	}  }  void VolumeCatcherImpl::setPan(F32 pan) diff --git a/indra/media_plugins/winmmshim/forwarding_api.cpp b/indra/media_plugins/winmmshim/forwarding_api.cpp index eff7e20451..c2f553dfef 100644 --- a/indra/media_plugins/winmmshim/forwarding_api.cpp +++ b/indra/media_plugins/winmmshim/forwarding_api.cpp @@ -2,25 +2,31 @@   * @file forwarding_api.cpp   * @brief forwards winmm API calls to real winmm.dll   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2010&license=viewergpl$ + *  + * 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/media_plugins/winmmshim/forwarding_api.h b/indra/media_plugins/winmmshim/forwarding_api.h index 89a6b347f3..31e2186aa2 100644 --- a/indra/media_plugins/winmmshim/forwarding_api.h +++ b/indra/media_plugins/winmmshim/forwarding_api.h @@ -2,25 +2,31 @@   * @file forwarding_api.h   * @brief forwards winmm API calls to real winmm.dll   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2010&license=viewergpl$ + *  + * 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/media_plugins/winmmshim/winmm_shim.cpp b/indra/media_plugins/winmmshim/winmm_shim.cpp index 9563a3b664..f7df3b19a0 100644 --- a/indra/media_plugins/winmmshim/winmm_shim.cpp +++ b/indra/media_plugins/winmmshim/winmm_shim.cpp @@ -2,25 +2,31 @@   * @file winmmshim.cpp   * @brief controls volume level of process by intercepting calls to winmm.dll   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2010&license=viewergpl$ + *  + * 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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 "forwarding_api.h" @@ -114,8 +120,8 @@ extern "C"  		{ // zero out the audio buffer when muted  			memset(pwh->lpData, 0, pwh->dwBufferLength);  		} -		else if (sVolumeLevel != 1.f)  -		{ // need to apply volume level +		else +		{  			wave_out_map_t::iterator found_it = sWaveOuts.find(hwo);  			if (found_it != sWaveOuts.end())  			{ @@ -138,11 +144,10 @@ extern "C"  						// copy volume level 4 times into 64 bit MMX register  						__m64 volume_64 = _mm_set_pi16(volume_16, volume_16, volume_16, volume_16); -						__m64* sample_64; -						__m64* last_sample_64 =  (__m64*)(pwh->lpData + pwh->dwBufferLength - sizeof(__m64)); +						__m64 *sample_64;  						// for everything that can be addressed in 64 bit multiples...  						for (sample_64 = (__m64*)pwh->lpData; -							sample_64 <= last_sample_64; +							sample_64 < (__m64*)(pwh->lpData + pwh->dwBufferLength);  							++sample_64)  						{  							//...multiply the samples by the volume... @@ -157,11 +162,10 @@ extern "C"  						// the captain has turned off the MMX sign, you are now free to use floating point registers  						_mm_empty(); -						// finish remaining samples that didn't fit into 64 bit register  						for (short* sample_16 = (short*)sample_64;  							sample_16 < (short*)(pwh->lpData + pwh->dwBufferLength);  							++sample_16) -						{	 +						{	// finish remaining samples that didn't fit into 64 bit register  							*sample_16 = (*sample_16 * volume_16) >> 15;  						} diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index efb16d1e42..835a9aacd5 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -104,6 +104,7 @@ set(viewer_SOURCE_FILES      llclassifiedinfo.cpp      llclassifiedstatsresponder.cpp      llcloud.cpp +    llcofwearables.cpp      llcolorswatch.cpp      llcommanddispatcherlistener.cpp      llcommandhandler.cpp @@ -142,6 +143,7 @@ set(viewer_SOURCE_FILES      llfavoritesbar.cpp      llfeaturemanager.cpp      llfilepicker.cpp +    llfilteredwearablelist.cpp      llfirstuse.cpp      llflexibleobject.cpp      llfloaterabout.cpp @@ -252,6 +254,7 @@ set(viewer_SOURCE_FILES      llinventoryclipboard.cpp      llinventoryfilter.cpp      llinventoryfunctions.cpp +    llinventoryitemslist.cpp      llinventorymodel.cpp      llinventorymodelbackgroundfetch.cpp      llinventoryobserver.cpp @@ -294,7 +297,9 @@ set(viewer_SOURCE_FILES      llnotificationmanager.cpp      llnotificationofferhandler.cpp      llnotificationscripthandler.cpp +    llnotificationstorage.cpp      llnotificationtiphandler.cpp +    lloutfitslist.cpp      lloutputmonitorctrl.cpp      llpanelavatar.cpp      llpanelavatartag.cpp @@ -327,6 +332,7 @@ set(viewer_SOURCE_FILES      llpanelnearbymedia.cpp      llpanelobject.cpp      llpanelobjectinventory.cpp +    llpanelonlinestatus.cpp      llpaneloutfitedit.cpp      llpaneloutfitsinventory.cpp      llpanelpeople.cpp @@ -528,6 +534,7 @@ set(viewer_SOURCE_FILES      llwaterparamset.cpp      llwearable.cpp      llwearabledictionary.cpp +    llwearableitemslist.cpp      llwearablelist.cpp      llweb.cpp      llwind.cpp @@ -608,6 +615,7 @@ set(viewer_HEADER_FILES      llclassifiedinfo.h      llclassifiedstatsresponder.h      llcloud.h +    llcofwearables.h      llcolorswatch.h      llcommanddispatcherlistener.h      llcommandhandler.h @@ -647,6 +655,7 @@ set(viewer_HEADER_FILES      llfavoritesbar.h      llfeaturemanager.h      llfilepicker.h +    llfilteredwearablelist.h      llfirstuse.h      llflexibleobject.h      llfloaterabout.h @@ -756,6 +765,7 @@ set(viewer_HEADER_FILES      llinventoryclipboard.h      llinventoryfilter.h      llinventoryfunctions.h +    llinventoryitemslist.h      llinventorymodel.h      llinventorymodelbackgroundfetch.h      llinventoryobserver.h @@ -795,6 +805,8 @@ set(viewer_HEADER_FILES      llnetmap.h      llnotificationhandler.h      llnotificationmanager.h +    llnotificationstorage.h +    lloutfitslist.h      lloutputmonitorctrl.h      llpanelavatar.h      llpanelavatartag.h @@ -827,6 +839,7 @@ set(viewer_HEADER_FILES      llpanelnearbymedia.h      llpanelobject.h      llpanelobjectinventory.h +    llpanelonlinestatus.h      llpaneloutfitedit.h      llpaneloutfitsinventory.h      llpanelpeople.h @@ -1030,6 +1043,7 @@ set(viewer_HEADER_FILES      llwaterparamset.h      llwearable.h      llwearabledictionary.h +    llwearableitemslist.h      llwearablelist.h      llweb.h      llwind.h @@ -1390,7 +1404,7 @@ if (WINDOWS)      # If adding a file to viewer_manifest.py in the WindowsManifest.construct() method, be sure to add the dependency      # here. -    # *NOTE:Mani - This is a crappy hack to have important dependecies for the viewer_manifest copy action +    # *NOTE:Mani - This is a crappy hack to have important dependencies for the viewer_manifest copy action      # be met. I'm looking forward to a source-code split-up project next year that will address this kind of thing.      # In the meantime, if you have any ideas on how to easily maintain one list, either here or in viewer_manifest.py      # and have the build deps get tracked *please* tell me about it. @@ -1411,7 +1425,7 @@ if (WINDOWS)      endif(USE_GOOGLE_PERFTOOLS) -    set(COPY_INPUT_DEPENDECIES +    set(COPY_INPUT_DEPENDENCIES        # The following commented dependencies are determined at variably at build time. Can't do this here.        #${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libtcmalloc_minimal.dll => None ... Skipping libtcmalloc_minimal.dll        ${CMAKE_SOURCE_DIR}/../etc/message.xml @@ -1445,8 +1459,6 @@ if (WINDOWS)        ${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt        ${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.dll        ${CMAKE_CURRENT_SOURCE_DIR}/fmod.dll -      ${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}/media_plugin_quicktime.dll -      ${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}/media_plugin_webkit.dll        ${ARCH_PREBUILT_DIRS_RELEASE}/libeay32.dll        ${ARCH_PREBUILT_DIRS_RELEASE}/qtcore4.dll        ${ARCH_PREBUILT_DIRS_RELEASE}/qtgui4.dll @@ -1486,6 +1498,7 @@ if (WINDOWS)        SLPlugin        media_plugin_quicktime        media_plugin_webkit +      winmm_shim        windows-crash-logger        windows-updater        ) @@ -1507,7 +1520,7 @@ if (WINDOWS)        DEPENDS           ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py          stage_third_party_libs -        ${COPY_INPUT_DEPENDECIES} +        ${COPY_INPUT_DEPENDENCIES}        COMMENT "Performing viewer_manifest copy"        ) @@ -1526,8 +1539,6 @@ if (WINDOWS)      add_dependencies(${VIEWER_BINARY_NAME}         SLPlugin  -      media_plugin_quicktime  -      media_plugin_webkit        windows-updater         windows-crash-logger        ) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5014ba3349..600c548212 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11038,5 +11038,16 @@        <integer>2048</integer>      </map>      <!-- End of back compatibility settings --> +    <key>teleport_offer_invitation_max_length</key> +    <map> +      <key>Comment</key> +      <string>Maximum length of teleport offer invitation line editor. 254 - max_location_url_length(76) = 178</string> +      <key>Persist</key> +      <integer>1</integer> +      <key>Type</key> +      <string>S32</string> +      <key>Value</key> +      <integer>178</integer> +    </map>  </map>  </llsd> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8bcf680876..ddcaeb113d 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1226,7 +1226,10 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s  	if ( distance > 1.f && heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f))  	{  		setFlying(TRUE); -		mAutoPilotFlyOnStop = TRUE; +		// Do not force flying for "Sit" behavior to prevent flying after pressing "Stand" +		// from an object. See EXT-1655. +		if ("Sit" != mAutoPilotBehaviorName) +			mAutoPilotFlyOnStop = TRUE;  	}  	mAutoPilot = TRUE; diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 7f248eee30..8a880e5ace 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1338,7 +1338,8 @@ public:  		LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key);  		LLPanelOutfitsInventory *outfit_panel =  			dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); -		if (outfit_panel) +		// TODO: add handling "My Outfits" tab. +		if (outfit_panel && outfit_panel->isCOFPanelActive())  		{  			outfit_panel->getRootFolder()->clearSelection();  			outfit_panel->getRootFolder()->setSelectionByID(mFolderID, TRUE); @@ -1361,24 +1362,6 @@ private:  	LLUUID mFolderID;  }; -LLUUID LLAgentWearables::makeNewOutfitLinks(const std::string& new_folder_name) -{ -	if (!isAgentAvatarValid()) return LLUUID::null; - -	// First, make a folder in the My Outfits directory. -	const LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); -	LLUUID folder_id = gInventory.createNewCategory( -		parent_id, -		LLFolderType::FT_OUTFIT, -		new_folder_name); - -	LLPointer<LLInventoryCallback> cb = new LLShowCreatedOutfit(folder_id); -	LLAppearanceMgr::instance().shallowCopyCategoryContents(LLAppearanceMgr::instance().getCOF(),folder_id, cb); -	LLAppearanceMgr::instance().createBaseOutfitLink(folder_id, cb); - -	return folder_id; -} -  void LLAgentWearables::makeNewOutfitDone(S32 type, U32 index)  {  	LLUUID first_item_id = getWearableItemID((EWearableType)type, index); @@ -2048,6 +2031,39 @@ void LLAgentWearables::animateAllWearableParams(F32 delta, BOOL upload_bake)  	}  } +bool LLAgentWearables::moveWearable(const LLViewerInventoryItem* item, bool closer_to_body) +{ +	if (!item) return false; +	if (!item->isWearableType()) return false; + +	wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(item->getWearableType()); +	if (wearable_iter == mWearableDatas.end()) return false; + +	wearableentry_vec_t& wearable_vec = wearable_iter->second; +	if (wearable_vec.empty()) return false; + +	const LLUUID& asset_id = item->getAssetUUID(); + +	//nowhere to move if the wearable is already on any boundary (closest to the body/furthest from the body) +	if (closer_to_body && asset_id == wearable_vec.front()->getAssetID()) return false; +	if (!closer_to_body && asset_id == wearable_vec.back()->getAssetID()) return false; + +	for (U32 i = 0; i < wearable_vec.size(); ++i) +	{ +		LLWearable* wearable = wearable_vec[i]; +		if (!wearable) continue; +		if (wearable->getAssetID() != asset_id) continue; +		 +		//swapping wearables +		U32 swap_i = closer_to_body ? i-1 : i+1; +		wearable_vec[i] = wearable_vec[swap_i]; +		wearable_vec[swap_i] = wearable; +		return true; +	} + +	return false; +} +  void LLAgentWearables::updateServer()  {  	sendAgentWearablesUpdate(); diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index b76367324c..d3b18f68f1 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -82,6 +82,8 @@ public:  	void			animateAllWearableParams(F32 delta, BOOL upload_bake); +	bool			moveWearable(const LLViewerInventoryItem* item, bool closer_to_body); +  	//--------------------------------------------------------------------  	// Accessors  	//-------------------------------------------------------------------- @@ -169,8 +171,7 @@ public:  								  const LLDynamicArray<S32>& wearables_to_include,  								  const LLDynamicArray<S32>& attachments_to_include,  								  BOOL rename_clothing); -	 -	LLUUID			makeNewOutfitLinks(const std::string& new_folder_name); +  	// Should only be called if we *know* we've never done so before, since users may  	// not want the Library outfits to stay in their quick outfit selector and can delete them. diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index 08d8ccfd23..03d09a3798 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -119,6 +119,7 @@ public:  								item->getLinkedUUID(),  								LLAppearanceMgr::instance().getCOF(),  								item->getName(), +								item->getDescription(),  								LLAssetType::AT_LINK,  								link_waiter);  		} @@ -507,6 +508,7 @@ void LLLibraryOutfitsFetch::contentsDone()  								item->getLinkedUUID(),  								new_outfit_folder_id,  								item->getName(), +								item->getDescription(),  								LLAssetType::AT_LINK,  								NULL);  		} diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 4d18ff57fe..5586b3cd4d 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -32,6 +32,7 @@  #include "llviewerprecompiledheaders.h" +#include "llaccordionctrltab.h"  #include "llagent.h"  #include "llagentwearables.h"  #include "llappearancemgr.h" @@ -42,6 +43,7 @@  #include "llinventoryfunctions.h"  #include "llinventoryobserver.h"  #include "llnotificationsutil.h" +#include "llpaneloutfitsinventory.h"  #include "llselectmgr.h"  #include "llsidepanelappearance.h"  #include "llsidetray.h" @@ -51,6 +53,8 @@  #include "llviewerregion.h"  #include "llwearablelist.h" +char ORDER_NUMBER_SEPARATOR('@'); +  LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id, const std::string& name)  {  	LLInventoryModel::cat_array_t cat_array; @@ -118,6 +122,38 @@ private:  	bool mAppend;  }; + +//Inventory callback updating "dirty" state when destroyed +class LLUpdateDirtyState: public LLInventoryCallback +{ +public: +	LLUpdateDirtyState() {} +	virtual ~LLUpdateDirtyState(){ LLAppearanceMgr::getInstance()->updateIsDirty(); } +	virtual void fire(const LLUUID&) {} +}; + + +//Inventory collect functor collecting wearables of a specific wearable type +class LLFindClothesOfType : public LLInventoryCollectFunctor +{ +public: +	LLFindClothesOfType(EWearableType type) : mWearableType(type) {} +	virtual ~LLFindClothesOfType() {} +	virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) +	{ +		if (!item) return false; +		if (item->getType() != LLAssetType::AT_CLOTHING) return false; +		 +		LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item); +		if (!vitem || vitem->getWearableType() != mWearableType) return false; + +		return true; +	} + +	const EWearableType mWearableType; +}; + +  LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy():  	mFireCount(0)  { @@ -400,6 +436,7 @@ public:  					     item_id,  					     LLAppearanceMgr::instance().getCOF(),  					     itemp->getName(), +						 itemp->getDescription(),  					     LLAssetType::AT_LINK,  					     cb);  		} @@ -691,10 +728,13 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL  		{  			case LLAssetType::AT_LINK:  			{ +				//LLInventoryItem::getDescription() is used for a new description  +				//to propagate ordering information saved in descriptions of links  				link_inventory_item(gAgent.getID(),  									item->getLinkedUUID(),  									dst_id,  									item->getName(), +									item->LLInventoryItem::getDescription(),  									LLAssetType::AT_LINK, cb);  				break;  			} @@ -708,6 +748,7 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL  										item->getLinkedUUID(),  										dst_id,  										item->getName(), +										item->getDescription(),  										LLAssetType::AT_LINK_FOLDER, cb);  				}  				break; @@ -811,20 +852,7 @@ void LLAppearanceMgr::filterWearableItems(  {  	// Divvy items into arrays by wearable type.  	std::vector<LLInventoryModel::item_array_t> items_by_type(WT_COUNT); -	for (S32 i=0; i<items.count(); i++) -	{ -		LLViewerInventoryItem *item = items.get(i); -		// Ignore non-wearables. -		if (!item->isWearableType()) -			continue; -		EWearableType type = item->getWearableType(); -		if(type < 0 || type >= WT_COUNT) -		{ -			LL_WARNS("Appearance") << "Invalid wearable type. Inventory type does not match wearable flag bitfield." << LL_ENDL; -			continue; -		} -		items_by_type[type].push_back(item); -	} +	divvyWearablesByType(items, items_by_type);  	// rebuild items list, retaining the last max_per_type of each array  	items.clear(); @@ -853,6 +881,7 @@ void LLAppearanceMgr::linkAll(const LLUUID& category,  							item->getLinkedUUID(),  							category,  							item->getName(), +							item->LLInventoryItem::getDescription(),  							LLAssetType::AT_LINK,  							cb);  	} @@ -956,7 +985,7 @@ void LLAppearanceMgr::createBaseOutfitLink(const LLUUID& category, LLPointer<LLI  	if (catp && catp->getPreferredType() == LLFolderType::FT_OUTFIT)  	{ -		link_inventory_item(gAgent.getID(), category, cof, catp->getName(), +		link_inventory_item(gAgent.getID(), category, cof, catp->getName(), "",  							LLAssetType::AT_LINK_FOLDER, link_waiter);  		new_outfit_name = catp->getName();  	} @@ -1016,8 +1045,24 @@ static void remove_non_link_items(LLInventoryModel::item_array_t &items)  	items = pruned_items;  } +//a predicate for sorting inventory items by actual descriptions +bool sort_by_description(const LLInventoryItem* item1, const LLInventoryItem* item2) +{ +	if (!item1 || !item2)  +	{ +		llwarning("either item1 or item2 is NULL", 0); +		return true; +	} + +	return item1->LLInventoryItem::getDescription() < item2->LLInventoryItem::getDescription(); +} +  void LLAppearanceMgr::updateAppearanceFromCOF()  { +	//checking integrity of the COF in terms of ordering of wearables,  +	//checking and updating links' descriptions of wearables in the COF (before analyzed for "dirty" state) +	updateClothingOrderingInfo(); +  	// update dirty flag to see if the state of the COF matches  	// the saved outfit stored as a folder link  	llinfos << "starting" << llendl; @@ -1046,6 +1091,9 @@ void LLAppearanceMgr::updateAppearanceFromCOF()  		return;  	} +	//preparing the list of wearables in the correct order for LLAgentWearables +	std::sort(wear_items.begin(), wear_items.end(), sort_by_description); +  	LLWearableHoldingPattern* holder = new LLWearableHoldingPattern;  	holder->mObjItems = obj_items; @@ -1079,8 +1127,8 @@ void LLAppearanceMgr::updateAppearanceFromCOF()  			}  #endif - -			holder->mFoundList.push_front(found); +			//pushing back, not front, to preserve order of wearables for LLAgentWearables +			holder->mFoundList.push_back(found);  		}  		else  		{ @@ -1407,7 +1455,7 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update  		// Are these links to different items of the same wearable  		// type? If so, new item will replace old.  		// MULTI-WEARABLES: revisit if more than one per type is allowed. -		else if (areMatchingWearables(vitem,inv_item)) +		else if (FALSE/*areMatchingWearables(vitem,inv_item)*/)  		{  			if (inv_item->getIsLinkType())  			{ @@ -1430,6 +1478,7 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update  							 vitem->getLinkedUUID(),  							 getCOF(),  							 vitem->getName(), +							 vitem->getDescription(),  							 LLAssetType::AT_LINK,  							 cb);  	} @@ -1446,6 +1495,7 @@ void LLAppearanceMgr::addEnsembleLink( LLInventoryCategory* cat, bool do_update  						 cat->getLinkedUUID(),  						 getCOF(),  						 cat->getName(), +						 cat->getDescription(),  						 LLAssetType::AT_LINK_FOLDER,  						 cb);  #endif @@ -1475,6 +1525,17 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, bool do_update)  	}  } +bool sort_by_linked_uuid(const LLViewerInventoryItem* item1, const LLViewerInventoryItem* item2) +{ +	if (!item1 || !item2) +	{ +		llwarning("item1, item2 cannot be null, something is very wrong", 0); +		return true; +	} + +	return item1->getLinkedUUID() < item2->getLinkedUUID(); +} +  void LLAppearanceMgr::updateIsDirty()  {  	LLUUID cof = getCOF(); @@ -1514,33 +1575,37 @@ void LLAppearanceMgr::updateIsDirty()  			// Current outfit folder should have one more item than the outfit folder.  			// this one item is the link back to the outfit folder itself.  			mOutfitIsDirty = true; +			return;  		} -		else -		{ -			typedef std::set<LLUUID> item_set_t; -			item_set_t cof_set; -			item_set_t outfit_set; -			// sort COF items by UUID -			for (S32 i = 0; i < cof_items.count(); ++i) +		//getting rid of base outfit folder link to simplify comparison +		for (LLInventoryModel::item_array_t::iterator it = cof_items.begin(); it != cof_items.end(); ++it) +		{ +			if (*it == base_outfit_item)  			{ -				LLViewerInventoryItem *item = cof_items.get(i); -				// don't add the base outfit link to the list of objects we're comparing -				if(item != base_outfit_item) -				{ -					cof_set.insert(item->getLinkedUUID()); -				} +				cof_items.erase(it); +				break;  			} +		} -			// sort outfit folder by UUID -			for (S32 i = 0; i < outfit_items.count(); ++i) +		//"dirty" - also means a difference in linked UUIDs and/or a difference in wearables order (links' descriptions) +		std::sort(cof_items.begin(), cof_items.end(), sort_by_linked_uuid); +		std::sort(outfit_items.begin(), outfit_items.end(), sort_by_linked_uuid); + +		for (U32 i = 0; i < cof_items.size(); ++i) +		{ +			LLViewerInventoryItem *item1 = cof_items.get(i); +			LLViewerInventoryItem *item2 = outfit_items.get(i); + +			if (item1->getLinkedUUID() != item2->getLinkedUUID() ||  +				item1->LLInventoryItem::getDescription() != item2->LLInventoryItem::getDescription())  			{ -				LLViewerInventoryItem *item = outfit_items.get(i); -				outfit_set.insert(item->getLinkedUUID()); +				mOutfitIsDirty = true; +				return;  			} - -			mOutfitIsDirty = (outfit_set != cof_set);  		} + +		mOutfitIsDirty = false;  	}  } @@ -1572,15 +1637,182 @@ bool LLAppearanceMgr::updateBaseOutfit()  	const LLUUID base_outfit_id = getBaseOutfitUUID();  	if (base_outfit_id.isNull()) return false; +	updateClothingOrderingInfo(); +  	// in a Base Outfit we do not remove items, only links  	purgeCategory(base_outfit_id, false); + +	LLPointer<LLInventoryCallback> dirty_state_updater = new LLUpdateDirtyState(); +  	//COF contains only links so we copy to the Base Outfit only links -	shallowCopyCategoryContents(getCOF(), base_outfit_id, NULL); +	shallowCopyCategoryContents(getCOF(), base_outfit_id, dirty_state_updater);  	return true;  } +void LLAppearanceMgr::divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type) +{ +	items_by_type.reserve(WT_COUNT); +	if (items.empty()) return; + +	for (S32 i=0; i<items.count(); i++) +	{ +		LLViewerInventoryItem *item = items.get(i); +		// Ignore non-wearables. +		if (!item->isWearableType()) +			continue; +		EWearableType type = item->getWearableType(); +		if(type < 0 || type >= WT_COUNT) +		{ +			LL_WARNS("Appearance") << "Invalid wearable type. Inventory type does not match wearable flag bitfield." << LL_ENDL; +			continue; +		} +		items_by_type[type].push_back(item); +	} +} + +std::string build_order_string(EWearableType type, U32 i) +{ +		std::ostringstream order_num; +		order_num << ORDER_NUMBER_SEPARATOR << type * 100 + i; +		return order_num.str(); +} + +struct WearablesOrderComparator +{ +	WearablesOrderComparator(const EWearableType type) +	{ +		mControlSize = build_order_string(type, 0).size(); +	}; + +	bool operator()(const LLInventoryItem* item1, const LLInventoryItem* item2) +	{ +		if (!item1 || !item2) +		{ +			llwarning("either item1 or item2 is NULL", 0); +			return true; +		} +		 +		const std::string& desc1 = item1->LLInventoryItem::getDescription(); +		const std::string& desc2 = item2->LLInventoryItem::getDescription(); +		 +		bool item1_valid = (desc1.size() == mControlSize) && (ORDER_NUMBER_SEPARATOR == desc1[0]); +		bool item2_valid = (desc2.size() == mControlSize) && (ORDER_NUMBER_SEPARATOR == desc2[0]); + +		if (item1_valid && item2_valid) +			return desc1 < desc2; + +		//we need to sink down invalid items: items with empty descriptions, items with "Broken link" descriptions, +		//items with ordering information but not for the associated wearables type +		if (!item1_valid && item2_valid)  +			return false; + +		return true; +	} + +	U32 mControlSize; +}; + +void LLAppearanceMgr::updateClothingOrderingInfo() +{ +	LLInventoryModel::item_array_t wear_items; +	getDescendentsOfAssetType(getCOF(), wear_items, LLAssetType::AT_CLOTHING, false); + +	wearables_by_type_t items_by_type(WT_COUNT); +	divvyWearablesByType(wear_items, items_by_type); + +	bool inventory_changed = false; +	for (U32 type = WT_SHIRT; type < WT_COUNT; type++) +	{ +		 +		U32 size = items_by_type[type].size(); +		if (!size) continue; + +		//sinking down invalid items which need reordering +		std::sort(items_by_type[type].begin(), items_by_type[type].end(), WearablesOrderComparator((EWearableType) type)); + +		//requesting updates only for those links which don't have "valid" descriptions +		for (U32 i = 0; i < size; i++) +		{ +			LLViewerInventoryItem* item = items_by_type[type][i]; +			if (!item) continue; + +			std::string new_order_str = build_order_string((EWearableType)type, i); +			if (new_order_str == item->LLInventoryItem::getDescription()) continue; + +			item->setDescription(new_order_str); +			item->setComplete(TRUE); + 			item->updateServer(FALSE); +			gInventory.updateItem(item); +			inventory_changed = true; +		} +	} + +	//*TODO do we really need to notify observers? +	if (inventory_changed) gInventory.notifyObservers(); +} + + + + +class LLShowCreatedOutfit: public LLInventoryCallback +{ +public: +	LLShowCreatedOutfit(LLUUID& folder_id): mFolderID(folder_id) +	{} + +	virtual ~LLShowCreatedOutfit() +	{ +		LLSD key; +		LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); +		LLPanelOutfitsInventory *outfit_panel = +			dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); +		if (outfit_panel) +		{ +			outfit_panel->getRootFolder()->clearSelection(); +			outfit_panel->getRootFolder()->setSelectionByID(mFolderID, TRUE); +		} +		 +		LLAccordionCtrlTab* tab_outfits = outfit_panel ? outfit_panel->findChild<LLAccordionCtrlTab>("tab_outfits") : 0; +		if (tab_outfits && !tab_outfits->getDisplayChildren()) +		{ +			tab_outfits->changeOpenClose(tab_outfits->getDisplayChildren()); +		} + +		LLAppearanceMgr::getInstance()->updateIsDirty(); +		LLAppearanceMgr::getInstance()->updatePanelOutfitName(""); +	} + +	virtual void fire(const LLUUID&) +	{} + +private: +	LLUUID mFolderID; +}; + +LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name) +{ +	if (!isAgentAvatarValid()) return LLUUID::null; + +	// First, make a folder in the My Outfits directory. +	const LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); +	LLUUID folder_id = gInventory.createNewCategory( +		parent_id, +		LLFolderType::FT_OUTFIT, +		new_folder_name); + +	updateClothingOrderingInfo(); + +	LLPointer<LLInventoryCallback> cb = new LLShowCreatedOutfit(folder_id); +	shallowCopyCategoryContents(getCOF(),folder_id, cb); +	createBaseOutfitLink(folder_id, cb); + +	dumpCat(folder_id,"COF, new outfit"); + +	return folder_id; +} +  void LLAppearanceMgr::wearBaseOutfit()  {  	const LLUUID& base_outfit_id = getBaseOutfitUUID(); @@ -1622,6 +1854,63 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)  	}  } + +bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_body) +{ +	if (!item || !item->isWearableType()) return false; +	if (item->getType() != LLAssetType::AT_CLOTHING) return false; +	if (!gInventory.isObjectDescendentOf(item->getUUID(), getCOF())) return false; + +	LLInventoryModel::cat_array_t cats; +	LLInventoryModel::item_array_t items; +	LLFindClothesOfType filter_wearables_of_type(item->getWearableType()); +	gInventory.collectDescendentsIf(getCOF(), cats, items, true, filter_wearables_of_type); +	if (items.empty()) return false; + +	//*TODO all items are not guarantied to have valid descriptions (check?) +	std::sort(items.begin(), items.end(), WearablesOrderComparator(item->getWearableType())); + +	if (closer_to_body && items.front() == item) return false; +	if (!closer_to_body && items.back() == item) return false; +	 +	LLInventoryModel::item_array_t::iterator it = std::find(items.begin(), items.end(), item); +	if (items.end() == it) return false; + + +	//swapping descriptions +	closer_to_body ? --it : ++it; +	LLViewerInventoryItem* swap_item = *it; +	if (!swap_item) return false; +	std::string tmp = swap_item->LLInventoryItem::getDescription(); +	swap_item->setDescription(item->LLInventoryItem::getDescription()); +	item->setDescription(tmp); + + +	//items need to be updated on a dataserver +	item->setComplete(TRUE); +	item->updateServer(FALSE); +	gInventory.updateItem(item); + +	swap_item->setComplete(TRUE); +	swap_item->updateServer(FALSE); +	gInventory.updateItem(swap_item); + +	//to cause appearance of the agent to be updated +	bool result = false; +	if (result = gAgentWearables.moveWearable(item, closer_to_body)) +	{ +		gAgentAvatarp->wearableUpdated(item->getWearableType(), TRUE); +	} + +	setOutfitDirty(true); + +	//*TODO do we need to notify observers here in such a way? +	gInventory.notifyObservers(); + +	return result; +} + +  //#define DUMP_CAT_VERBOSE  void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg) diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 7e35919892..a308a3efa9 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -138,12 +138,25 @@ public:  	//Remove clothing or detach an object from the agent (a bodypart cannot be removed)  	void removeItemFromAvatar(const LLUUID& item_id); + +	LLUUID makeNewOutfitLinks(const std::string& new_folder_name); + +	bool moveWearable(LLViewerInventoryItem* item, bool closer_to_body); +  protected:  	LLAppearanceMgr();  	~LLAppearanceMgr();  private: +	typedef std::vector<LLInventoryModel::item_array_t> wearables_by_type_t; + +	//Divvy items into arrays by wearable type +	static void divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type); + +	//Check ordering information on wearables stored in links' descriptions and update if it is invalid +	void updateClothingOrderingInfo(); +  	void filterWearableItems(LLInventoryModel::item_array_t& items, S32 max_per_type);  	void getDescendentsOfAssetType(const LLUUID& category,  diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 80d9b14345..44ef39fb7d 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -291,6 +291,7 @@ static OSStatus CarbonEventHandler(EventHandlerCallRef inHandlerCallRef,  		if(os_result >= 0 && matching_psn)  		{  			sCrashReporterIsRunning = false; +			QuitApplicationEventLoop();  		}      }      return noErr; @@ -326,7 +327,7 @@ void LLAppViewerMacOSX::handleCrashReporting(bool reportFreeze)  			// *NOTE:Mani A better way - make a copy of the data that the crash reporter will send  			// and let SL go about its business. This way makes the mac work like windows and linux  			// and is the smallest patch for the issue.  -			sCrashReporterIsRunning = true; +			sCrashReporterIsRunning = false;  			ProcessSerialNumber o_psn;  			static EventHandlerRef sCarbonEventsRef = NULL; @@ -356,15 +357,13 @@ void LLAppViewerMacOSX::handleCrashReporting(bool reportFreeze)  			if(os_result >= 0)  			{	 -				EventRecord evt; -				while(sCrashReporterIsRunning) -				{ -					while(WaitNextEvent(osMask, &evt, 0, NULL)) -					{ -						// null op!?! -					} -				} -			}	 +				sCrashReporterIsRunning = true; +			} + +			while(sCrashReporterIsRunning) +			{ +				RunApplicationEventLoop(); +			}  			// Re-install the apps quit handler.  			AEInstallEventHandler(kCoreEventClass,  @@ -453,16 +452,17 @@ std::string LLAppViewerMacOSX::generateSerialNumber()  static AudioDeviceID get_default_audio_output_device(void)  {  	AudioDeviceID device = 0; -	UInt32 size; -	OSStatus err; -	 -	size = sizeof(device); -	err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &size, &device); +	UInt32 size = sizeof(device); +	AudioObjectPropertyAddress device_address = { kAudioHardwarePropertyDefaultOutputDevice, +												  kAudioObjectPropertyScopeGlobal, +												  kAudioObjectPropertyElementMaster }; + +	OSStatus err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &device_address, 0, NULL, &size, &device);  	if(err != noErr)  	{  		LL_DEBUGS("SystemMute") << "Couldn't get default audio output device (0x" << std::hex << err << ")" << LL_ENDL;  	} -	 +  	return device;  } @@ -470,11 +470,15 @@ static AudioDeviceID get_default_audio_output_device(void)  void LLAppViewerMacOSX::setMasterSystemAudioMute(bool new_mute)  {  	AudioDeviceID device = get_default_audio_output_device(); -	 +  	if(device != 0)  	{  		UInt32 mute = new_mute; -		OSStatus err = AudioDeviceSetProperty(device, NULL, 0, false, kAudioDevicePropertyMute, sizeof(mute), &mute); +		AudioObjectPropertyAddress device_address = { kAudioDevicePropertyMute, +													  kAudioDevicePropertyScopeOutput, +													  kAudioObjectPropertyElementMaster }; + +		OSStatus err = AudioObjectSetPropertyData(device, &device_address, 0, NULL, sizeof(mute), &mute);  		if(err != noErr)  		{  			LL_INFOS("SystemMute") << "Couldn't set audio mute property (0x" << std::hex << err << ")" << LL_ENDL; @@ -487,13 +491,17 @@ bool LLAppViewerMacOSX::getMasterSystemAudioMute()  {  	// Assume the system isn't muted   	UInt32 mute = 0; -	 +  	AudioDeviceID device = get_default_audio_output_device(); -	 +  	if(device != 0)  	{  		UInt32 size = sizeof(mute); -		OSStatus err = AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyMute, &size, &mute); +		AudioObjectPropertyAddress device_address = { kAudioDevicePropertyMute, +													  kAudioDevicePropertyScopeOutput, +													  kAudioObjectPropertyElementMaster }; + +		OSStatus err = AudioObjectGetPropertyData(device, &device_address, 0, NULL, &size, &mute);  		if(err != noErr)  		{  			LL_DEBUGS("SystemMute") << "Couldn't get audio mute property (0x" << std::hex << err << ")" << LL_ENDL; diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 8ba47b5198..dfb213716c 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -34,6 +34,7 @@  // common  #include "lltrans.h" +#include "llcommonutils.h"  #include "llavatarlist.h"  #include "llagentdata.h" // for comparator @@ -176,13 +177,15 @@ void LLAvatarList::clear()  void LLAvatarList::setNameFilter(const std::string& filter)  { -	if (mNameFilter != filter) +	std::string filter_upper = filter; +	LLStringUtil::toUpper(filter_upper); +	if (mNameFilter != filter_upper)  	{ -		mNameFilter = filter; +		mNameFilter = filter_upper;  		// update message for empty state here instead of refresh() to avoid blinking when switch  		// between tabs. -		updateNoItemsMessage(!mNameFilter.empty()); +		updateNoItemsMessage(filter);  		setDirty();  	}  } @@ -404,7 +407,6 @@ void LLAvatarList::computeDifference(  	uuid_vec_t& vremoved)  {  	uuid_vec_t vcur; -	uuid_vec_t vnew = vnew_unsorted;  	// Convert LLSDs to LLUUIDs.  	{ @@ -415,21 +417,7 @@ void LLAvatarList::computeDifference(  			vcur.push_back(vcur_values[i].asUUID());  	} -	std::sort(vcur.begin(), vcur.end()); -	std::sort(vnew.begin(), vnew.end()); - -	uuid_vec_t::iterator it; -	size_t maxsize = llmax(vcur.size(), vnew.size()); -	vadded.resize(maxsize); -	vremoved.resize(maxsize); - -	// what to remove -	it = set_difference(vcur.begin(), vcur.end(), vnew.begin(), vnew.end(), vremoved.begin()); -	vremoved.erase(it, vremoved.end()); - -	// what to add -	it = set_difference(vnew.begin(), vnew.end(), vcur.begin(), vcur.end(), vadded.begin()); -	vadded.erase(it, vadded.end()); +	LLCommonUtils::computeDifference(vnew_unsorted, vcur, vadded, vremoved);  }  // Refresh shown time of our last interaction with all listed avatars. diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 4ab3d8dc98..4f9434030f 100644 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -2,25 +2,31 @@   * @file llchannelmanager.cpp   * @brief This class rules screen notification channels.   * - * $LicenseInfo:firstyear=2000&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2000&license=viewergpl$ + *  + * Copyright (c) 2000-2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ @@ -237,19 +243,3 @@ void LLChannelManager::killToastsFromChannel(const LLUUID& channel_id, const LLS  	}  } -// static -LLNotificationsUI::LLScreenChannel* LLChannelManager::getNotificationScreenChannel() -{ -	LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*> -	(LLNotificationsUI::LLChannelManager::getInstance()-> -										findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); - -	if (channel == NULL) -	{ -		llwarns << "Can't find screen channel by NotificationChannelUUID" << llendl; -		llassert(!"Can't find screen channel by NotificationChannelUUID"); -	} - -	return channel; -} - diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index aef36b677c..6ee14e8ba9 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -44,6 +44,8 @@  #include "llviewercontrol.h"  #include "llagentdata.h" +#include "llslurl.h" +  static const S32 msg_left_offset = 10;  static const S32 msg_right_offset = 10;  static const S32 msg_height_pad = 5; @@ -190,6 +192,8 @@ void LLNearbyChatToastPanel::init(LLSD& notification)  			style_params_name.font.name(font_name);  			style_params_name.font.size(font_style_size); +			style_params_name.link_href = LLSLURL::buildCommand("agent",mFromID,"about"); +  			msg_text->appendText(str_sender, FALSE, style_params_name);  		} diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 489c66be71..9d421b4f0b 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -921,6 +921,9 @@ protected:  class LLNotificationChiclet : public LLSysWellChiclet  {  	friend class LLUICtrlFactory; +public: +	struct Params : public LLInitParam::Block<Params, LLSysWellChiclet::Params>{}; +  protected:  	LLNotificationChiclet(const Params& p); diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 04623c03be..f0442ee3f6 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -2,25 +2,31 @@   * @file llcofwearables.cpp   * @brief LLCOFWearables displayes wearables from the current outfit split into three lists (attachments, clothing and body parts)   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2010&license=viewergpl$ + *  + * 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ @@ -28,270 +34,24 @@  #include "llcofwearables.h" -#include "llaccordionctrl.h" -#include "llaccordionctrltab.h" -#include "llagentdata.h" -#include "llagentwearables.h"  #include "llappearancemgr.h"  #include "llinventory.h" +#include "llinventoryitemslist.h"  #include "llinventoryfunctions.h" -#include "lllistcontextmenu.h" -#include "llmenugl.h" -#include "llviewermenu.h" -#include "llwearableitemslist.h" -#include "llpaneloutfitedit.h" -#include "llsidetray.h" -#include "lltrans.h"  static LLRegisterPanelClassWrapper<LLCOFWearables> t_cof_wearables("cof_wearables");  const LLSD REARRANGE = LLSD().with("rearrange", LLSD()); -static const LLWearableItemNameComparator WEARABLE_NAME_COMPARATOR; - -////////////////////////////////////////////////////////////////////////// - -class CofContextMenu : public LLListContextMenu -{ -protected: -	CofContextMenu(LLCOFWearables* cof_wearables) -	:	mCOFWearables(cof_wearables) -	{ -		llassert(mCOFWearables); -	} - -	void updateCreateWearableLabel(LLMenuGL* menu, const LLUUID& item_id) -	{ -		LLMenuItemGL* menu_item = menu->getChild<LLMenuItemGL>("create_new"); -		LLWearableType::EType w_type = getWearableType(item_id); - -		// Hide the "Create new <WEARABLE_TYPE>" if it's irrelevant. -		if (w_type == LLWearableType::WT_NONE) -		{ -			menu_item->setVisible(FALSE); -			return; -		} - -		// Set proper label for the "Create new <WEARABLE_TYPE>" menu item. -		std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getTypeName(w_type)); -		menu_item->setLabel(new_label); -	} - -	void createNew(const LLUUID& item_id) -	{ -		LLAgentWearables::createWearable(getWearableType(item_id), true); -	} - -	// Get wearable type of the given item. -	// -	// There is a special case: so-called "dummy items" -	// (i.e. the ones that are there just to indicate that you're not wearing -	// any wearables of the corresponding type. They are currently grayed out -	// and suffixed with "not worn"). -	// Those items don't have an UUID, but they do have an associated wearable type. -	// If the user has invoked context menu for such item, -	// we ignore the passed item_id and retrieve wearable type from the item. -	LLWearableType::EType getWearableType(const LLUUID& item_id) -	{ -		if (!isDummyItem(item_id)) -		{ -			LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id); -			if (item && item->isWearableType()) -			{ -				return item->getWearableType(); -			} -		} -		else if (mCOFWearables) // dummy item selected -		{ -			LLPanelDummyClothingListItem* item; - -			item = dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem()); -			if (item) -			{ -				return item->getWearableType(); -			} -		} - -		return LLWearableType::WT_NONE; -	} - -	static bool isDummyItem(const LLUUID& item_id) -	{ -		return item_id.isNull(); -	} - -	LLCOFWearables* mCOFWearables; -}; - -////////////////////////////////////////////////////////////////////////// - -class CofAttachmentContextMenu : public CofContextMenu -{ -public: -	CofAttachmentContextMenu(LLCOFWearables* cof_wearables) -	:	CofContextMenu(cof_wearables) -	{ -	} - -protected: - -	/*virtual*/ LLContextMenu* createMenu() -	{ -		LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - -		functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1); -		registrar.add("Attachment.Detach", boost::bind(handleMultiple, take_off, mUUIDs)); - -		return createFromFile("menu_cof_attachment.xml"); -	} -}; - -////////////////////////////////////////////////////////////////////////// - -class CofClothingContextMenu : public CofContextMenu -{ -public: -	CofClothingContextMenu(LLCOFWearables* cof_wearables) -	:	CofContextMenu(cof_wearables) -	{ -	} - -protected: -	static void replaceWearable(const LLUUID& item_id) -	{ -		// *TODO: Most probable that accessing to LLPanelOutfitEdit instance should be: -		// LLSideTray::getInstance()->getSidepanelAppearance()->getPanelOutfitEdit() -		// without casting. Getter methods provides possibility to check and construct -		// absent instance. Explicit relations between components avoids situations -		// when we tries to construct instance with unsatisfied implicit input conditions. -		LLPanelOutfitEdit	* panel_outfit_edit = -						dynamic_cast<LLPanelOutfitEdit*> (LLSideTray::getInstance()->getPanel( -								"panel_outfit_edit")); -		if (panel_outfit_edit != NULL) -		{ -			panel_outfit_edit->onReplaceMenuItemClicked(item_id); -		} -	} - -	/*virtual*/ LLContextMenu* createMenu() -	{ -		LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; -		LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; -		LLUUID selected_id = mUUIDs.back(); -		functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1); - -		registrar.add("Clothing.TakeOff", boost::bind(handleMultiple, take_off, mUUIDs)); -		registrar.add("Clothing.Replace", boost::bind(replaceWearable, selected_id)); -		registrar.add("Clothing.Edit", boost::bind(LLAgentWearables::editWearable, selected_id)); -		registrar.add("Clothing.Create", boost::bind(&CofClothingContextMenu::createNew, this, selected_id)); - -		enable_registrar.add("Clothing.OnEnable", boost::bind(&CofClothingContextMenu::onEnable, this, _2)); - -		LLContextMenu* menu = createFromFile("menu_cof_clothing.xml"); -		llassert(menu); -		if (menu) -		{ -			updateCreateWearableLabel(menu, selected_id); -		} -		return menu; -	} - -	bool onEnable(const LLSD& data) -	{ -		std::string param = data.asString(); -		LLUUID selected_id = mUUIDs.back(); - -		if ("take_off" == param) -		{ -			return get_is_item_worn(selected_id); -		} -		else if ("edit" == param) -		{ -			return mUUIDs.size() == 1 && gAgentWearables.isWearableModifiable(selected_id); -		} -		else if ("replace" == param) -		{ -			return get_is_item_worn(selected_id) && mUUIDs.size() == 1; -		} - -		return true; -	} -}; - -////////////////////////////////////////////////////////////////////////// - -class CofBodyPartContextMenu : public CofContextMenu -{ -public: -	CofBodyPartContextMenu(LLCOFWearables* cof_wearables) -	:	CofContextMenu(cof_wearables) -	{ -	} - -protected: -	/*virtual*/ LLContextMenu* createMenu() -	{ -		LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; -		LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; -		LLUUID selected_id = mUUIDs.back(); - -		// *HACK* need to pass pointer to LLPanelOutfitEdit instead of LLSideTray::getInstance()->getPanel(). -		// LLSideTray::getInstance()->getPanel() is rather slow variant -		LLPanelOutfitEdit* panel_oe = dynamic_cast<LLPanelOutfitEdit*>(LLSideTray::getInstance()->getPanel("panel_outfit_edit")); -		registrar.add("BodyPart.Replace", boost::bind(&LLPanelOutfitEdit::onReplaceMenuItemClicked, panel_oe, selected_id)); -		registrar.add("BodyPart.Edit", boost::bind(LLAgentWearables::editWearable, selected_id)); -		registrar.add("BodyPart.Create", boost::bind(&CofBodyPartContextMenu::createNew, this, selected_id)); - -		enable_registrar.add("BodyPart.OnEnable", boost::bind(&CofBodyPartContextMenu::onEnable, this, _2)); - -		LLContextMenu* menu = createFromFile("menu_cof_body_part.xml"); -		llassert(menu); -		if (menu) -		{ -			updateCreateWearableLabel(menu, selected_id); -		} -		return menu; -	} - -	bool onEnable(const LLSD& data) -	{ -		std::string param = data.asString(); -		LLUUID selected_id = mUUIDs.back(); - -		if ("edit" == param) -		{ -			return mUUIDs.size() == 1 && gAgentWearables.isWearableModifiable(selected_id); -		} - -		return true; -	} -}; - -//////////////////////////////////////////////////////////////////////////  LLCOFWearables::LLCOFWearables() : LLPanel(),  	mAttachments(NULL),  	mClothing(NULL),  	mBodyParts(NULL), -	mLastSelectedList(NULL), -	mClothingTab(NULL), -	mAttachmentsTab(NULL), -	mBodyPartsTab(NULL), -	mLastSelectedTab(NULL), -	mAccordionCtrl(NULL), -	mCOFVersion(-1) +	mLastSelectedList(NULL)  { -	mClothingMenu = new CofClothingContextMenu(this); -	mAttachmentMenu = new CofAttachmentContextMenu(this); -	mBodyPartMenu = new CofBodyPartContextMenu(this);  }; -LLCOFWearables::~LLCOFWearables() -{ -	delete mClothingMenu; -	delete mAttachmentMenu; -	delete mBodyPartMenu; -}  // virtual  BOOL LLCOFWearables::postBuild() @@ -300,9 +60,6 @@ BOOL LLCOFWearables::postBuild()  	mClothing = getChild<LLFlatListView>("list_clothing");  	mBodyParts = getChild<LLFlatListView>("list_body_parts"); -	mClothing->setRightMouseDownCallback(boost::bind(&LLCOFWearables::onListRightClick, this, _1, _2, _3, mClothingMenu)); -	mAttachments->setRightMouseDownCallback(boost::bind(&LLCOFWearables::onListRightClick, this, _1, _2, _3, mAttachmentMenu)); -	mBodyParts->setRightMouseDownCallback(boost::bind(&LLCOFWearables::onListRightClick, this, _1, _2, _3, mBodyPartMenu));  	//selection across different list/tabs is not supported  	mAttachments->setCommitCallback(boost::bind(&LLCOFWearables::onSelectionChange, this, mAttachments)); @@ -313,26 +70,6 @@ BOOL LLCOFWearables::postBuild()  	mClothing->setCommitOnSelectionChange(true);  	mBodyParts->setCommitOnSelectionChange(true); -	//clothing is sorted according to its position relatively to the body -	mAttachments->setComparator(&WEARABLE_NAME_COMPARATOR); -	mBodyParts->setComparator(&WEARABLE_NAME_COMPARATOR); - - -	mClothingTab = getChild<LLAccordionCtrlTab>("tab_clothing"); -	mClothingTab->setDropDownStateChangedCallback(boost::bind(&LLCOFWearables::onAccordionTabStateChanged, this, _1, _2)); - -	mAttachmentsTab = getChild<LLAccordionCtrlTab>("tab_attachments"); -	mAttachmentsTab->setDropDownStateChangedCallback(boost::bind(&LLCOFWearables::onAccordionTabStateChanged, this, _1, _2)); - -	mBodyPartsTab = getChild<LLAccordionCtrlTab>("tab_body_parts"); -	mBodyPartsTab->setDropDownStateChangedCallback(boost::bind(&LLCOFWearables::onAccordionTabStateChanged, this, _1, _2)); - -	mTab2AssetType[mClothingTab] = LLAssetType::AT_CLOTHING; -	mTab2AssetType[mAttachmentsTab] = LLAssetType::AT_OBJECT; -	mTab2AssetType[mBodyPartsTab] = LLAssetType::AT_BODYPART; - -	mAccordionCtrl = getChild<LLAccordionCtrl>("cof_wearables_accordion"); -  	return LLPanel::postBuild();  } @@ -352,264 +89,53 @@ void LLCOFWearables::onSelectionChange(LLFlatListView* selected_list)  	onCommit();  } -void LLCOFWearables::onAccordionTabStateChanged(LLUICtrl* ctrl, const LLSD& expanded) -{ -	bool had_selected_items = mClothing->numSelected() || mAttachments->numSelected() || mBodyParts->numSelected(); -	mClothing->resetSelection(true); -	mAttachments->resetSelection(true); -	mBodyParts->resetSelection(true); - -	bool tab_selection_changed = false; -	LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl); -	if (tab && tab != mLastSelectedTab) -	{ -		mLastSelectedTab = tab; -		tab_selection_changed = true; -	} - -	if (had_selected_items || tab_selection_changed) -	{ -		//sending commit signal to indicate selection changes -		onCommit(); -	} -} -  void LLCOFWearables::refresh()  { -	const LLUUID cof_id = LLAppearanceMgr::instance().getCOF(); -	if (cof_id.isNull()) -	{ -		llwarns << "COF ID cannot be NULL" << llendl; -		return; -	} - -	LLViewerInventoryCategory* catp = gInventory.getCategory(cof_id); -	if (!catp) -	{ -		llwarns << "COF category cannot be NULL" << llendl; -		return; -	} - -	// BAP - this check has to be removed because an item name change does not -	// change cat version - ie, checking version is not a complete way -	// of finding out whether anything has changed in this category. -	//if (mCOFVersion == catp->getVersion()) return; - -	mCOFVersion = catp->getVersion(); - -	typedef std::vector<LLSD> values_vector_t; -	typedef std::map<LLFlatListView*, values_vector_t> selection_map_t; - -	selection_map_t preserve_selection; - -	// Save current selection -	mAttachments->getSelectedValues(preserve_selection[mAttachments]); -	mClothing->getSelectedValues(preserve_selection[mClothing]); -	mBodyParts->getSelectedValues(preserve_selection[mBodyParts]); -  	clear();  	LLInventoryModel::cat_array_t cats; -	LLInventoryModel::item_array_t cof_items; - -	gInventory.collectDescendents(cof_id, cats, cof_items, LLInventoryModel::EXCLUDE_TRASH); - -	populateAttachmentsAndBodypartsLists(cof_items); - - -	LLAppearanceMgr::wearables_by_type_t clothing_by_type(LLWearableType::WT_COUNT); -	LLAppearanceMgr::getInstance()->divvyWearablesByType(cof_items, clothing_by_type); +	LLInventoryModel::item_array_t items; -	populateClothingList(clothing_by_type); +	gInventory.collectDescendents(LLAppearanceMgr::getInstance()->getCOF(), cats, items, LLInventoryModel::EXCLUDE_TRASH); +	if (items.empty()) return; -	// Restore previous selection -	for (selection_map_t::iterator -			 iter = preserve_selection.begin(), -			 iter_end = preserve_selection.end(); -		 iter != iter_end; ++iter) +	for (U32 i = 0; i < items.size(); ++i)  	{ -		LLFlatListView* list = iter->first; -		if (!list) continue; +		LLViewerInventoryItem* item = items.get(i); +		if (!item) continue; -		//restoring selection should not fire commit callbacks -		list->setCommitOnSelectionChange(false); +		LLPanelInventoryListItem* item_panel = LLPanelInventoryListItem::createItemPanel(item); +		if (!item_panel) continue; -		const values_vector_t& values = iter->second; -		for (values_vector_t::const_iterator -				 value_it = values.begin(), -				 value_it_end = values.end(); -			 value_it != value_it_end; ++value_it) +		switch (item->getType())  		{ -			// value_it may be null because of dummy items -			// Dummy items have no ID -			if(value_it->asUUID().notNull()) -			{ -				list->selectItemByValue(*value_it); -			} -		} - -		list->setCommitOnSelectionChange(true); -	} -} +			case LLAssetType::AT_OBJECT: +				mAttachments->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); +				break; +			case LLAssetType::AT_BODYPART: +				mBodyParts->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); +				break; -void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items) -{ -	for (U32 i = 0; i < cof_items.size(); ++i) -	{ -		LLViewerInventoryItem* item = cof_items.get(i); -		if (!item) continue; - -		const LLAssetType::EType item_type = item->getType(); -		if (item_type == LLAssetType::AT_CLOTHING) continue; -		LLPanelInventoryListItemBase* item_panel = NULL; -		if (item_type == LLAssetType::AT_OBJECT) -		{ -			item_panel = buildAttachemntListItem(item); -			mAttachments->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); -		} -		else if (item_type == LLAssetType::AT_BODYPART) -		{ -			item_panel = buildBodypartListItem(item); -			if (!item_panel) continue; +			case LLAssetType::AT_CLOTHING: +				mClothing->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); +				break; -			mBodyParts->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); +			default: break;  		}  	} -	if (mAttachments->size()) -	{ -		mAttachments->sort(); -		mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false) -	} - -	if (mBodyParts->size()) -	{ -		mBodyParts->sort(); -		mBodyParts->notify(REARRANGE); -	} -} - -//create a clothing list item, update verbs and show/hide line separator -LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventoryItem* item, bool first, bool last) -{ -	llassert(item); -	if (!item) return NULL; -	LLPanelClothingListItem* item_panel = LLPanelClothingListItem::create(item); -	if (!item_panel) return NULL; - -	//updating verbs -	//we don't need to use permissions of a link but of an actual/linked item -	if (item->getLinkedItem()) item = item->getLinkedItem(); -	llassert(item); -	if (!item) return NULL; - -	bool allow_modify = item->getPermissions().allowModifyBy(gAgentID); +	mAttachments->sort(); //*TODO by Name +	mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false) -	item_panel->setShowLockButton(!allow_modify); -	item_panel->setShowEditButton(allow_modify); - -	item_panel->setShowMoveUpButton(!first); -	item_panel->setShowMoveDownButton(!last); - -	//setting callbacks -	//*TODO move that item panel's inner structure disclosing stuff into the panels -	item_panel->childSetAction("btn_delete", mCOFCallbacks.mDeleteWearable); -	item_panel->childSetAction("btn_move_up", mCOFCallbacks.mMoveWearableFurther); -	item_panel->childSetAction("btn_move_down", mCOFCallbacks.mMoveWearableCloser); -	item_panel->childSetAction("btn_edit", mCOFCallbacks.mEditWearable); -	 -	//turning on gray separator line for the last item in the items group of the same wearable type -	item_panel->setSeparatorVisible(last); - -	return item_panel; -} - -LLPanelBodyPartsListItem* LLCOFWearables::buildBodypartListItem(LLViewerInventoryItem* item) -{ -	llassert(item); -	if (!item) return NULL; -	LLPanelBodyPartsListItem* item_panel = LLPanelBodyPartsListItem::create(item); -	if (!item_panel) return NULL; - -	//updating verbs -	//we don't need to use permissions of a link but of an actual/linked item -	if (item->getLinkedItem()) item = item->getLinkedItem(); -	llassert(item); -	if (!item) return NULL; -	bool allow_modify = item->getPermissions().allowModifyBy(gAgentID); -	item_panel->setShowLockButton(!allow_modify); -	item_panel->setShowEditButton(allow_modify); - -	//setting callbacks -	//*TODO move that item panel's inner structure disclosing stuff into the panels -	item_panel->childSetAction("btn_delete", mCOFCallbacks.mDeleteWearable); -	item_panel->childSetAction("btn_edit", mCOFCallbacks.mEditWearable); - -	return item_panel; -} - -LLPanelDeletableWearableListItem* LLCOFWearables::buildAttachemntListItem(LLViewerInventoryItem* item) -{ -	llassert(item); -	if (!item) return NULL; - -	LLPanelAttachmentListItem* item_panel = LLPanelAttachmentListItem::create(item); -	if (!item_panel) return NULL; - -	//setting callbacks -	//*TODO move that item panel's inner structure disclosing stuff into the panels -	item_panel->childSetAction("btn_delete", mCOFCallbacks.mDeleteWearable); - -	return item_panel; -} - -void LLCOFWearables::populateClothingList(LLAppearanceMgr::wearables_by_type_t& clothing_by_type) -{ -	llassert(clothing_by_type.size() == LLWearableType::WT_COUNT); - -	for (U32 type = LLWearableType::WT_SHIRT; type < LLWearableType::WT_COUNT; ++type) -	{ -		U32 size = clothing_by_type[type].size(); -		if (!size) continue; - -		LLAppearanceMgr::sortItemsByActualDescription(clothing_by_type[type]); - -		//clothing items are displayed in reverse order, from furthest ones to closest ones (relatively to the body) -		for (U32 i = size; i != 0; --i) -		{ -			LLViewerInventoryItem* item = clothing_by_type[type][i-1]; - -			LLPanelClothingListItem* item_panel = buildClothingListItem(item, i == size, i == 1); -			if (!item_panel) continue; - -			mClothing->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); -		} -	} - -	addClothingTypesDummies(clothing_by_type); - +	mClothing->sort(); //*TODO by actual inventory item description  	mClothing->notify(REARRANGE); -} - -//adding dummy items for missing wearable types -void LLCOFWearables::addClothingTypesDummies(const LLAppearanceMgr::wearables_by_type_t& clothing_by_type) -{ -	llassert(clothing_by_type.size() == LLWearableType::WT_COUNT); -	for (U32 type = LLWearableType::WT_SHIRT; type < LLWearableType::WT_COUNT; type++) -	{ -		U32 size = clothing_by_type[type].size(); -		if (size) continue; - -		LLWearableType::EType w_type = static_cast<LLWearableType::EType>(type); -		LLPanelInventoryListItemBase* item_panel = LLPanelDummyClothingListItem::create(w_type); -		if(!item_panel) continue; -		item_panel->childSetAction("btn_add", mCOFCallbacks.mAddWearable); -		mClothing->addItem(item_panel, LLUUID::null, ADD_BOTTOM, false); -	} +	mBodyParts->sort(); //*TODO by name +	mBodyParts->notify(REARRANGE);  } +  LLUUID LLCOFWearables::getSelectedUUID()  {  	if (!mLastSelectedList) return LLUUID::null; @@ -617,29 +143,6 @@ LLUUID LLCOFWearables::getSelectedUUID()  	return mLastSelectedList->getSelectedUUID();  } -bool LLCOFWearables::getSelectedUUIDs(uuid_vec_t& selected_ids) -{ -	if (!mLastSelectedList) return false; - -	mLastSelectedList->getSelectedUUIDs(selected_ids); -	return selected_ids.size() != 0; -} - -LLPanel* LLCOFWearables::getSelectedItem() -{ -	if (!mLastSelectedList) return NULL; - -	return mLastSelectedList->getSelectedItem(); -} - -void LLCOFWearables::getSelectedItems(std::vector<LLPanel*>& selected_items) const -{ -	if (mLastSelectedList) -	{ -		mLastSelectedList->getSelectedItems(selected_items); -	} -} -  void LLCOFWearables::clear()  {  	mAttachments->clear(); @@ -647,65 +150,4 @@ void LLCOFWearables::clear()  	mBodyParts->clear();  } -LLAssetType::EType LLCOFWearables::getExpandedAccordionAssetType() -{ -	typedef std::map<std::string, LLAssetType::EType> type_map_t; - -	static type_map_t type_map; - -	if (mAccordionCtrl != NULL) -	{ -		const LLAccordionCtrlTab* expanded_tab = mAccordionCtrl->getExpandedTab(); - -		return get_if_there(mTab2AssetType, expanded_tab, LLAssetType::AT_NONE); -	} - -	return LLAssetType::AT_NONE; -} - -LLAssetType::EType LLCOFWearables::getSelectedAccordionAssetType() -{ -	if (mAccordionCtrl != NULL) -	{ -		const LLAccordionCtrlTab* selected_tab = mAccordionCtrl->getSelectedTab(); - -		return get_if_there(mTab2AssetType, selected_tab, LLAssetType::AT_NONE); -	} - -	return LLAssetType::AT_NONE; -} - -void LLCOFWearables::expandDefaultAccordionTab() -{ -	if (mAccordionCtrl != NULL) -	{ -		mAccordionCtrl->expandDefaultTab(); -	} -} - -void LLCOFWearables::onListRightClick(LLUICtrl* ctrl, S32 x, S32 y, LLListContextMenu* menu) -{ -	if(menu) -	{ -		uuid_vec_t selected_uuids; -		if(getSelectedUUIDs(selected_uuids)) -		{ -			bool show_menu = false; -			for(uuid_vec_t::iterator it = selected_uuids.begin();it!=selected_uuids.end();++it) -			{ -				if ((*it).notNull()) -				{ -					show_menu = true; -					break; -				} -			} - -			if(show_menu) -			{ -				menu->show(ctrl, selected_uuids, x, y); -			} -		} -	} -} -  //EOF diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index e426b10810..58d67ed32f 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -2,104 +2,57 @@   * @file llcofwearables.h   * @brief LLCOFWearables displayes wearables from the current outfit split into three lists (attachments, clothing and body parts)   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2010&license=viewergpl$ + *  + * 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE.   * $/LicenseInfo$   */  #ifndef LL_LLCOFWEARABLES_H  #define LL_LLCOFWEARABLES_H -// llui -#include "llflatlistview.h"  #include "llpanel.h" -#include "llappearancemgr.h" -#include "llinventorymodel.h" - -class LLAccordionCtrl; -class LLAccordionCtrlTab; -class LLListContextMenu; -class LLPanelClothingListItem; -class LLPanelBodyPartsListItem; -class LLPanelDeletableWearableListItem; +class LLFlatListView;  class LLCOFWearables : public LLPanel  {  public: - -	/** -	 * Represents a collection of callbacks assigned to inventory panel item's buttons -	 */ -	class LLCOFCallbacks -	{ -	public: -		LLCOFCallbacks() {}; -		virtual ~LLCOFCallbacks() {}; -		 -		typedef boost::function<void (void*)> cof_callback_t; - -		cof_callback_t mAddWearable; -		cof_callback_t mMoveWearableCloser; -		cof_callback_t mMoveWearableFurther; -		cof_callback_t mEditWearable; -		cof_callback_t mDeleteWearable; -	}; - - -  	LLCOFWearables(); -	virtual ~LLCOFWearables(); +	virtual ~LLCOFWearables() {};  	/*virtual*/ BOOL postBuild();  	LLUUID getSelectedUUID(); -	bool getSelectedUUIDs(uuid_vec_t& selected_ids); -	LLPanel* getSelectedItem(); -	void getSelectedItems(std::vector<LLPanel*>& selected_items) const; - -	/* Repopulate the COF wearables list if the COF category has been changed since the last refresh */  	void refresh();  	void clear(); -	LLAssetType::EType getExpandedAccordionAssetType(); -	LLAssetType::EType getSelectedAccordionAssetType(); -	void expandDefaultAccordionTab(); - -	LLCOFCallbacks& getCOFCallbacks() { return mCOFCallbacks; } -  protected: -	void populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items); -	void populateClothingList(LLAppearanceMgr::wearables_by_type_t& clothing_by_type); -	 -	void addClothingTypesDummies(const LLAppearanceMgr::wearables_by_type_t& clothing_by_type);  	void onSelectionChange(LLFlatListView* selected_list); -	void onAccordionTabStateChanged(LLUICtrl* ctrl, const LLSD& expanded); - -	LLPanelClothingListItem* buildClothingListItem(LLViewerInventoryItem* item, bool first, bool last); -	LLPanelBodyPartsListItem* buildBodypartListItem(LLViewerInventoryItem* item); -	LLPanelDeletableWearableListItem* buildAttachemntListItem(LLViewerInventoryItem* item); - -	void onListRightClick(LLUICtrl* ctrl, S32 x, S32 y, LLListContextMenu* menu);  	LLFlatListView* mAttachments;  	LLFlatListView* mClothing; @@ -107,24 +60,6 @@ protected:  	LLFlatListView* mLastSelectedList; -	LLAccordionCtrlTab* mClothingTab; -	LLAccordionCtrlTab* mAttachmentsTab; -	LLAccordionCtrlTab* mBodyPartsTab; - -	LLAccordionCtrlTab* mLastSelectedTab; - -	std::map<const LLAccordionCtrlTab*, LLAssetType::EType> mTab2AssetType; - -	LLCOFCallbacks mCOFCallbacks; - -	LLListContextMenu* mClothingMenu; -	LLListContextMenu* mAttachmentMenu; -	LLListContextMenu* mBodyPartMenu; - -	LLAccordionCtrl*	mAccordionCtrl; - -	/* COF category version since last refresh */ -	S32 mCOFVersion;  }; diff --git a/indra/newview/llfilteredwearablelist.cpp b/indra/newview/llfilteredwearablelist.cpp index cd5e779c4d..01d3c3f22e 100644 --- a/indra/newview/llfilteredwearablelist.cpp +++ b/indra/newview/llfilteredwearablelist.cpp @@ -2,25 +2,30 @@   * @file llfilteredwearablelist.cpp   * @brief Functionality for showing filtered wearable flat list   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + *   * 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 + * 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$   */ @@ -32,10 +37,34 @@  #include "llinventoryitemslist.h"  #include "llinventorymodel.h" +class LLFindItemsByMask : public LLInventoryCollectFunctor +{ +public: +	LLFindItemsByMask(U64 mask) +		: mFilterMask(mask) +	{} + +	virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) +	{ +		if(item) +		{ +			if( mFilterMask & (1LL << item->getInventoryType()) ) +			{ +				return TRUE; +			} +		} +		return FALSE; +	} -LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, LLInventoryCollectFunctor* collector) +private: +	U64 mFilterMask; +}; + +////////////////////////////////////////////////////////////////////////// + +LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, U64 filter_mask)  : mWearableList(list) -, mCollector(collector) +, mFilterMask(filter_mask)  {  	llassert(mWearableList);  	gInventory.addObserver(this); @@ -49,15 +78,6 @@ LLFilteredWearableListManager::~LLFilteredWearableListManager()  void LLFilteredWearableListManager::changed(U32 mask)  { -	if (LLInventoryObserver::CALLING_CARD == mask -			|| LLInventoryObserver::GESTURE == mask -			|| LLInventoryObserver::SORT == mask -			) -	{ -		// skip non-related changes -		return; -	} -  	if(!gInventory.isInventoryUsable())  	{  		return; @@ -66,9 +86,9 @@ void LLFilteredWearableListManager::changed(U32 mask)  	populateList();  } -void LLFilteredWearableListManager::setFilterCollector(LLInventoryCollectFunctor* collector) +void LLFilteredWearableListManager::setFilterMask(U64 mask)  { -	mCollector = collector; +	mFilterMask = mask;  	populateList();  } @@ -76,16 +96,14 @@ void LLFilteredWearableListManager::populateList()  {  	LLInventoryModel::cat_array_t cat_array;  	LLInventoryModel::item_array_t item_array; +	LLFindItemsByMask collector(mFilterMask); -	if(mCollector) -	{ -		gInventory.collectDescendentsIf( -				gInventory.getRootFolderID(), -				cat_array, -				item_array, -				LLInventoryModel::EXCLUDE_TRASH, -				*mCollector); -	} +	gInventory.collectDescendentsIf( +		gInventory.getRootFolderID(), +		cat_array, +		item_array, +		LLInventoryModel::EXCLUDE_TRASH, +		collector);  	// Probably will also need to get items from Library (waiting for reply in EXT-6724). diff --git a/indra/newview/llfilteredwearablelist.h b/indra/newview/llfilteredwearablelist.h index c21458ca98..3f42833bb4 100644 --- a/indra/newview/llfilteredwearablelist.h +++ b/indra/newview/llfilteredwearablelist.h @@ -2,43 +2,47 @@   * @file llfilteredwearablelist.h   * @brief Functionality for showing filtered wearable flat list   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + *   * 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 + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab.  Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE.   * $/LicenseInfo$   */  #ifndef LL_LLFILTEREDWEARABLELIST_H  #define LL_LLFILTEREDWEARABLELIST_H -#include "llinventoryfunctions.h"  #include "llinventoryobserver.h"  class LLInventoryItemsList; -// Class that fills LLInventoryItemsList with filtered data (original items only (non-links)). +// Class that fills LLInventoryItemsList with filtered data.  class LLFilteredWearableListManager : public LLInventoryObserver  {  	LOG_CLASS(LLFilteredWearableListManager);  public: -	LLFilteredWearableListManager(LLInventoryItemsList* list, LLInventoryCollectFunctor* collector); +	LLFilteredWearableListManager(LLInventoryItemsList* list, U64 filter_mask);  	~LLFilteredWearableListManager();  	/** LLInventoryObserver implementation @@ -47,9 +51,9 @@ public:  	/*virtual*/ void changed(U32 mask);  	/** -	 * Sets new collector and applies it immediately +	 * Sets new filter and applies it immediately  	 */ -	void setFilterCollector(LLInventoryCollectFunctor* collector); +	void setFilterMask(U64 mask);  	/**  	 * Populates wearable list with filtered data. @@ -58,7 +62,7 @@ public:  private:  	LLInventoryItemsList* mWearableList; -	LLInventoryCollectFunctor* mCollector; +	U64 mFilterMask;  };  #endif //LL_LLFILTEREDWEARABLELIST_H diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index d37bc01885..76a61db5fd 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -54,6 +54,7 @@  #include "llstatusbar.h"  #include "lltextbox.h"  #include "lltexturectrl.h" +#include "lltrans.h"  #include "llviewchildren.h"  #include "llviewercontrol.h"  #include "lluictrlfactory.h" @@ -1172,13 +1173,13 @@ void LLFloaterBuyLandUI::refreshUI()  		if (!mParcelValid)  		{ -			message += getString("no_parcel_selected"); +			message += LLTrans::getString("sentences_separator") + getString("no_parcel_selected");  		}  		else if (mParcelBillableArea == mParcelActualArea)  		{  			LLStringUtil::format_map_t string_args;  			string_args["[AMOUNT]"] = llformat("%d ", mParcelActualArea); -			message += getString("parcel_meters", string_args); +			message += LLTrans::getString("sentences_separator") + getString("parcel_meters", string_args);  		}  		else  		{ @@ -1187,13 +1188,13 @@ void LLFloaterBuyLandUI::refreshUI()  			{	  				LLStringUtil::format_map_t string_args;  				string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea); -				message += getString("premium_land", string_args); +				message += LLTrans::getString("sentences_separator") + getString("premium_land", string_args);  			}  			else  			{  				LLStringUtil::format_map_t string_args;  				string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea); -				message += getString("discounted_land", string_args); +				message += LLTrans::getString("sentences_separator") + getString("discounted_land", string_args);  			}  		} diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index c492bfcef1..eba4cdfa31 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -946,7 +946,9 @@ void LLFolderView::draw()  		}  		else  		{ -			mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage()); +			LLStringUtil::format_map_t args; +			args["[SEARCH_TERM]"] = LLURI::escape(getFilter()->getFilterSubStringOrig()); +			mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage(), args);  			//font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL,  LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE );  		}  		mStatusTextBox->setValue(mStatusText); diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index f21b6e1085..252c34cf9c 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -131,9 +131,15 @@ BOOL LLGroupList::handleRightMouseDown(S32 x, S32 y, MASK mask)  void LLGroupList::setNameFilter(const std::string& filter)  { -	if (mNameFilter != filter) +	std::string filter_upper = filter; +	LLStringUtil::toUpper(filter_upper); +	if (mNameFilter != filter_upper)  	{ -		mNameFilter = filter; +		mNameFilter = filter_upper; + +		// set no items message depend on filter state +		updateNoItemsMessage(filter); +  		setDirty();  	}  } @@ -151,9 +157,6 @@ void LLGroupList::refresh()  	LLUUID				id;  	bool				have_filter		= !mNameFilter.empty(); -	// set no items message depend on filter state & total count of groups -	updateNoItemsMessage(have_filter); -  	clear();  	for(S32 i = 0; i < count; ++i) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 909878207c..f03026715d 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1767,6 +1767,8 @@ void LLOutgoingCallDialog::show(const LLSD& key)  			getChild<LLTextBox>("leaving")->setVisible(true);  		}  		break; +	// STATE_READY is here to show appropriate text for ad-hoc and group calls when floater is shown(EXT-6893) +	case LLVoiceChannel::STATE_READY :  	case LLVoiceChannel::STATE_RINGING :  		if(show_oldchannel)  		{ diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b85bf0d518..b4a1bf2758 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2520,6 +2520,7 @@ void LLFolderBridge::pasteLinkFromClipboard()  						item->getLinkedUUID(),  						parent_id,  						item->getName(), +						item->getDescription(),  						LLAssetType::AT_LINK,  						LLPointer<LLInventoryCallback>(NULL));  				} @@ -3166,6 +3167,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,  						inv_item->getLinkedUUID(),  						mUUID,  						inv_item->getName(), +						inv_item->getDescription(),  						LLAssetType::AT_LINK,  						cb);  				} diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 1a488175ac..901a570487 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -329,9 +329,10 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)  		// appending new characters  		const BOOL more_restrictive = mFilterSubString.size() < string.size() && !string.substr(0, mFilterSubString.size()).compare(mFilterSubString); -		mFilterSubString = string; +		mFilterSubStringOrig = string; +		LLStringUtil::trimHead(mFilterSubStringOrig); +		mFilterSubString = mFilterSubStringOrig;  		LLStringUtil::toUpper(mFilterSubString); -		LLStringUtil::trimHead(mFilterSubString);  		if (less_restrictive)  		{  			setModified(FILTER_LESS_RESTRICTIVE); diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index f488b2ed1b..2376ba5d22 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -3,25 +3,31 @@  * @brief Support for filtering your inventory to only display a subset of the  * available items.  * -* $LicenseInfo:firstyear=2005&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2010, Linden Research, Inc. +* $LicenseInfo:firstyear=2005&license=viewergpl$ +*  +* Copyright (c) 2005-2009, 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. +* 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  *  -* 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. +* 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  *  -* 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 +* 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.  *  -* Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA +* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO +* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, +* COMPLETENESS OR PERFORMANCE.  * $/LicenseInfo$  */  #ifndef LLINVENTORYFILTER_H @@ -50,20 +56,13 @@ public:  		FILTER_MORE_RESTRICTIVE		// if you didn't pass the previous filter, you definitely won't pass this one  	}; -	enum EFilterType	{ -		FILTERTYPE_NONE = 0, -		FILTERTYPE_OBJECT = 0x1 << 0,	// normal default search-by-object-type -		FILTERTYPE_CATEGORY = 0x1 << 1,	// search by folder type -		FILTERTYPE_UUID	= 0x1 << 2,		// find the object with UUID and any links to it -		FILTERTYPE_DATE = 0x1 << 3,		// search by date range -		FILTERTYPE_WEARABLE = 0x1 << 4	// search by wearable type -	}; - -	enum EFilterLink +	enum EFilterType  	{ -		FILTERLINK_INCLUDE_LINKS,	// show links too -		FILTERLINK_EXCLUDE_LINKS,	// don't show links -		FILTERLINK_ONLY_LINKS		// only show links +		FILTERTYPE_NONE = 0, +		FILTERTYPE_OBJECT = 1,		// normal default search-by-object-type +		FILTERTYPE_CATEGORY = 2,	// search by folder type +		FILTERTYPE_UUID	= 4,		// find the object with UUID and any links to it +		FILTERTYPE_DATE = 8			// search by date range  	};  	// REFACTOR: Change this to an enum. @@ -82,7 +81,6 @@ public:  	BOOL 				isFilterObjectTypesWith(LLInventoryType::EType t) const;  	void 				setFilterCategoryTypes(U64 types);  	void 				setFilterUUID(const LLUUID &object_id); -	void				setFilterWearableTypes(U64 types);  	void 				setFilterSubString(const std::string& string);  	const std::string& 	getFilterSubString(BOOL trim = FALSE) const; @@ -100,17 +98,11 @@ public:  	void 				setHoursAgo(U32 hours);  	U32 				getHoursAgo() const; -	void 				setFilterLinks(U64 filter_link); -	U64					getFilterLinks() const; -  	// +-------------------------------------------------------------------+  	// + Execution And Results  	// +-------------------------------------------------------------------+  	BOOL 				check(const LLFolderViewItem* item); -	BOOL 				checkAgainstFilterType(const LLFolderViewItem* item) const; -	BOOL 				checkAgainstPermissions(const LLFolderViewItem* item) const; -	BOOL 				checkAgainstFilterLinks(const LLFolderViewItem* item) const; - +	BOOL 				checkAgainstFilterType(const LLFolderViewItem* item);  	std::string::size_type getStringMatchOffset() const;  	// +-------------------------------------------------------------------+ @@ -172,7 +164,6 @@ private:  		U32 			mFilterTypes;  		U64				mFilterObjectTypes; // For _OBJECT -		U64				mFilterWearableTypes;  		U64				mFilterCategoryTypes; // For _CATEGORY  		LLUUID      	mFilterUUID; // for UUID @@ -181,7 +172,6 @@ private:  		U32				mHoursAgo;  		EFolderShow		mShowFolderState;  		PermissionMask	mPermissions; -		U64				mFilterLinks;  	};  	U32						mOrder; diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 2b81ba8a12..dca130c672 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -3,26 +3,33 @@   * @brief A list of inventory items represented by LLFlatListView.   *   * Class LLInventoryItemsList implements a flat list of inventory items. + * Class LLPanelInventoryListItem displays inventory item as an element + * of LLInventoryItemsList. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc.   * - * $LicenseInfo:firstyear=2010&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 + * 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$   */ @@ -33,36 +40,108 @@  // llcommon  #include "llcommonutils.h" -#include "lltrans.h" +#include "lliconctrl.h" -#include "llcallbacklist.h" -#include "llinventorylistitem.h" +#include "llinventoryfunctions.h"  #include "llinventorymodel.h" -#include "llviewerinventory.h" +#include "lltextutil.h" + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +// static +LLPanelInventoryListItem* LLPanelInventoryListItem::createItemPanel(const LLViewerInventoryItem* item) +{ +	if (item) +	{ +		return new LLPanelInventoryListItem(item); +	} +	else +	{ +		return NULL; +	} +} + +LLPanelInventoryListItem::~LLPanelInventoryListItem() +{} + +//virtual +BOOL LLPanelInventoryListItem::postBuild() +{ +	mIcon = getChild<LLIconCtrl>("item_icon"); +	mTitle = getChild<LLTextBox>("item_name"); + +	updateItem(); + +	return TRUE; +} + +//virtual +void LLPanelInventoryListItem::setValue(const LLSD& value) +{ +	if (!value.isMap()) return; +	if (!value.has("selected")) return; +	childSetVisible("selected_icon", value["selected"]); +} + +void LLPanelInventoryListItem::updateItem() +{ +	if (mItemIcon.notNull()) +		mIcon->setImage(mItemIcon); + +	LLTextUtil::textboxSetHighlightedVal( +		mTitle, +		LLStyle::Params(), +		mItemName, +		mHighlightedText); +} + +void LLPanelInventoryListItem::onMouseEnter(S32 x, S32 y, MASK mask) +{ +	childSetVisible("hovered_icon", true); + +	LLPanel::onMouseEnter(x, y, mask); +} + +void LLPanelInventoryListItem::onMouseLeave(S32 x, S32 y, MASK mask) +{ +	childSetVisible("hovered_icon", false); + +	LLPanel::onMouseLeave(x, y, mask); +} + +LLPanelInventoryListItem::LLPanelInventoryListItem(const LLViewerInventoryItem* item) +:	 LLPanel() +	,mIcon(NULL) +	,mTitle(NULL) +{ +	mItemName = item->getName(); +	mItemIcon = get_item_icon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE); + +	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml"); +} + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////  LLInventoryItemsList::Params::Params()  {}  LLInventoryItemsList::LLInventoryItemsList(const LLInventoryItemsList::Params& p) -:	LLFlatListViewEx(p) +:	LLFlatListView(p)  ,	mNeedsRefresh(false) -,	mForceRefresh(false)  {  	// TODO: mCommitOnSelectionChange is set to "false" in LLFlatListView  	// but reset to true in all derived classes. This settings might need to  	// be added to LLFlatListView::Params() and/or set to "true" by default.  	setCommitOnSelectionChange(true); - -	setNoFilteredItemsMsg(LLTrans::getString("InventoryNoMatchingItems")); - -	gIdleCallbacks.addFunction(idle, this);  }  // virtual  LLInventoryItemsList::~LLInventoryItemsList() -{ -	gIdleCallbacks.deleteFunction(idle, this); -} +{}  void LLInventoryItemsList::refreshList(const LLInventoryModel::item_array_t item_array)  { @@ -75,39 +154,18 @@ void LLInventoryItemsList::refreshList(const LLInventoryModel::item_array_t item  	mNeedsRefresh = true;  } -boost::signals2::connection LLInventoryItemsList::setRefreshCompleteCallback(const commit_signal_t::slot_type& cb) -{ -	return mRefreshCompleteSignal.connect(cb); -} - -void LLInventoryItemsList::doIdle() +void LLInventoryItemsList::draw()  { -	if (!mNeedsRefresh) return; - -	if (isInVisibleChain() || mForceRefresh) +	LLFlatListView::draw(); +	if(mNeedsRefresh)  	{  		refresh(); - -		mRefreshCompleteSignal(this, LLSD()); -	} -} - -//static -void LLInventoryItemsList::idle(void* user_data) -{ -	LLInventoryItemsList* self = static_cast<LLInventoryItemsList*>(user_data); -	if ( self ) -	{	// Do the real idle -		self->doIdle();  	}  } -LLFastTimer::DeclareTimer FTM_INVENTORY_ITEMS_REFRESH("Inventory List Refresh"); -  void LLInventoryItemsList::refresh()  { -	LLFastTimer _(FTM_INVENTORY_ITEMS_REFRESH); -	static const unsigned ADD_LIMIT = 20; +	static const unsigned ADD_LIMIT = 50;  	uuid_vec_t added_items;  	uuid_vec_t removed_items; @@ -115,7 +173,7 @@ void LLInventoryItemsList::refresh()  	computeDifference(getIDs(), added_items, removed_items);  	bool add_limit_exceeded = false; -	unsigned int nadded = 0; +	unsigned nadded = 0;  	uuid_vec_t::const_iterator it = added_items.begin();  	for( ; added_items.end() != it; ++it) @@ -126,28 +184,18 @@ void LLInventoryItemsList::refresh()  			break;  		}  		LLViewerInventoryItem* item = gInventory.getItem(*it); -		// Do not rearrange items on each adding, let's do that on filter call -		llassert(item); -		if (item) -		{ -			addNewItem(item, false); -			++nadded; -		} +		addNewItem(item); +		++nadded;  	}  	it = removed_items.begin();  	for( ; removed_items.end() != it; ++it)  	{ -		// don't filter items right away -		removeItemByUUID(*it, false); +		removeItemByUUID(*it);  	} -	// Filter, rearrange and notify parent about shape changes -	filterItems(); -  	bool needs_refresh = add_limit_exceeded;  	setNeedsRefresh(needs_refresh); -	setForceRefresh(needs_refresh);  }  void LLInventoryItemsList::computeDifference( @@ -167,23 +215,22 @@ void LLInventoryItemsList::computeDifference(  	LLCommonUtils::computeDifference(vnew, vcur, vadded, vremoved);  } -void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item, bool rearrange /*= true*/) +void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item)  {  	if (!item)  	{  		llwarns << "No inventory item. Couldn't create flat list item." << llendl; -		llassert(item != NULL); +		llassert(!"No inventory item. Couldn't create flat list item.");  	} -	LLPanelInventoryListItemBase *list_item = LLPanelInventoryListItemBase::create(item); +	LLPanelInventoryListItem *list_item = LLPanelInventoryListItem::createItemPanel(item);  	if (!list_item)  		return; -	bool is_item_added = addItem(list_item, item->getUUID(), ADD_BOTTOM, rearrange); -	if (!is_item_added) +	if (!addItem(list_item, item->getUUID()))  	{  		llwarns << "Couldn't add flat list item." << llendl; -		llassert(is_item_added); +		llassert(!"Couldn't add flat list item.");  	}  } diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h index ca90427659..b496f4b9e9 100644 --- a/indra/newview/llinventoryitemslist.h +++ b/indra/newview/llinventoryitemslist.h @@ -3,26 +3,33 @@   * @brief A list of inventory items represented by LLFlatListView.   *   * Class LLInventoryItemsList implements a flat list of inventory items. + * Class LLPanelInventoryListItem displays inventory item as an element + * of LLInventoryItemsList. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc.   * - * $LicenseInfo:firstyear=2010&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 + * 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$   */ @@ -31,16 +38,46 @@  #include "lldarray.h" +#include "llpanel.h" +  // newview  #include "llflatlistview.h" +class LLIconCtrl; +class LLTextBox;  class LLViewerInventoryItem; -class LLInventoryItemsList : public LLFlatListViewEx +class LLPanelInventoryListItem : public LLPanel  { -	LOG_CLASS(LLInventoryItemsList);  public: -	struct Params : public LLInitParam::Block<Params, LLFlatListViewEx::Params> +	static LLPanelInventoryListItem* createItemPanel(const LLViewerInventoryItem* item); + +	virtual ~LLPanelInventoryListItem(); + +	/*virtual*/ BOOL postBuild(); +	/*virtual*/ void setValue(const LLSD& value); + +	void updateItem(); + +	void onMouseEnter(S32 x, S32 y, MASK mask); +	void onMouseLeave(S32 x, S32 y, MASK mask); + +protected: +	LLPanelInventoryListItem(const LLViewerInventoryItem* item); + +private: +	LLIconCtrl*		mIcon; +	LLTextBox*		mTitle; + +	LLUIImagePtr	mItemIcon; +	std::string		mItemName; +	std::string		mHighlightedText; +}; + +class LLInventoryItemsList : public LLFlatListView +{ +public: +	struct Params : public LLInitParam::Block<Params, LLFlatListView::Params>  	{  		Params();  	}; @@ -49,29 +86,14 @@ public:  	void refreshList(const LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array); -	boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb); -  	/** -	 * Let list know items need to be refreshed in next doIdle() +	 * Let list know items need to be refreshed in next draw()  	 */  	void setNeedsRefresh(bool needs_refresh){ mNeedsRefresh = needs_refresh; }  	bool getNeedsRefresh(){ return mNeedsRefresh; } -	/** -	 * Sets the flag indicating that the list needs to be refreshed even if it is -	 * not currently visible. -	 */ -	void setForceRefresh(bool force_refresh){ mForceRefresh = force_refresh; } - -	/** -	 * Idle routine used to refresh the list regardless of the current list -	 * visibility, unlike draw() which is called only for the visible list. -	 * This is needed for example to filter items of the list hidden by closed -	 * accordion tab. -	 */ -	void	doIdle();						// Real idle routine -	static void idle(void* user_data);		// static glue to doIdle() +	/*virtual*/ void draw();  protected:  	friend class LLUICtrlFactory; @@ -81,7 +103,7 @@ protected:  	/**  	 * Refreshes list items, adds new items and removes deleted items.  -	 * Called from doIdle() until all new items are added, +	 * Called from draw() until all new items are added, ,  	 * maximum 50 items can be added during single call.  	 */  	void refresh(); @@ -95,16 +117,12 @@ protected:  	/**  	 * Add an item to the list  	 */ -	virtual void addNewItem(LLViewerInventoryItem* item, bool rearrange = true); +	void addNewItem(LLViewerInventoryItem* item);  private:  	uuid_vec_t mIDs; // IDs of items that were added in refreshList().  					 // Will be used in refresh() to determine added and removed ids  	bool mNeedsRefresh; - -	bool mForceRefresh; - -	commit_signal_t mRefreshCompleteSignal;  };  #endif //LL_LLINVENTORYITEMSLIST_H diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 29d99d328a..214b5d317a 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -650,3 +650,53 @@ void LLInventoryTransactionObserver::changed(U32 mask)  		}  	}  } + +void LLInventoryCategoriesObserver::changed(U32 mask) +{ +	if (!mCategoryMap.size()) +		return; + +	for (category_map_t::iterator iter = mCategoryMap.begin(); +		 iter != mCategoryMap.end(); +		 ++iter) +	{ +		LLViewerInventoryCategory* category = gInventory.getCategory((*iter).first); +		if (!category) +			continue; + +		S32 version = category->getVersion(); +		if (version != (*iter).second.mVersion) +		{ +			// Update category version in map. +			(*iter).second.mVersion = version; +			(*iter).second.mCallback(); +		} +	} +} + +void LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t cb) +{ +	S32 version; +	LLViewerInventoryCategory* category = gInventory.getCategory(cat_id); +	if (category) +	{ +		// Inventory category version is used to find out if some changes +		// to a category have been made. +		version = category->getVersion(); +	} +	else +	{ +		// If category could not be retrieved it might mean that +		// inventory is unusable at the moment so the category is +		// stored with VERSION_UNKNOWN and it may be updated later. +		version = LLViewerInventoryCategory::VERSION_UNKNOWN; +	} + +	version = category->getVersion(); +	mCategoryMap.insert(category_map_value_t(cat_id, LLCategoryData(cb, version))); +} + +void LLInventoryCategoriesObserver::removeCategory(const LLUUID& cat_id) +{ +	mCategoryMap.erase(cat_id); +} diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index 8d60df7e8d..e63b67d2ad 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -261,5 +261,40 @@ protected:  	uuid_vec_t mIncomplete;  }; -#endif // LL_LLINVENTORYOBSERVERS_H +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLInventoryCategoriesObserver +// +// This class is used for monitoring a list of inventory categories +// and firing a callback when there are changes in any of them. +// Categories are identified by their UUIDs. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLInventoryCategoriesObserver : public LLInventoryObserver +{ +public: +	typedef boost::function<void()> callback_t; + +	LLInventoryCategoriesObserver() {}; +	virtual void changed(U32 mask); + +	void addCategory(const LLUUID& cat_id, callback_t cb); +	void removeCategory(const LLUUID& cat_id); +protected: +	struct LLCategoryData +	{ +		LLCategoryData(callback_t cb, S32 version) +		: mCallback(cb) +		, mVersion(version) +		{} + +		callback_t	mCallback; +		S32			mVersion; +	}; + +	typedef	std::map<LLUUID, LLCategoryData>	category_map_t; +	typedef category_map_t::value_type			category_map_value_t; + +	category_map_t				mCategoryMap; +}; + +#endif // LL_LLINVENTORYOBSERVERS_H diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 4e0be81f62..7abb4f4f16 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -38,6 +38,7 @@  // common includes  #include "llbutton.h"  #include "llfocusmgr.h" +#include "llhelp.h"  #include "llmenugl.h"  #include "llparcel.h"  #include "llstring.h" @@ -177,6 +178,7 @@ static LLDefaultChildRegistry::Register<LLLocationInputCtrl> r("location_input")  LLLocationInputCtrl::Params::Params()  :	icon_maturity_general("icon_maturity_general"),  	icon_maturity_adult("icon_maturity_adult"), +	icon_maturity_moderate("icon_maturity_moderate"),  	add_landmark_image_enabled("add_landmark_image_enabled"),  	add_landmark_image_disabled("add_landmark_image_disabled"),  	add_landmark_image_hover("add_landmark_image_hover"), @@ -186,14 +188,15 @@ LLLocationInputCtrl::Params::Params()  	add_landmark_button("add_landmark_button"),  	for_sale_button("for_sale_button"),  	info_button("info_button"), -	maturity_icon("maturity_icon"), +	maturity_button("maturity_button"),  	voice_icon("voice_icon"),  	fly_icon("fly_icon"),  	push_icon("push_icon"),  	build_icon("build_icon"),  	scripts_icon("scripts_icon"),  	damage_icon("damage_icon"), -	damage_text("damage_text") +	damage_text("damage_text"), +	maturity_help_topic("maturity_help_topic")  {  } @@ -208,7 +211,9 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)  	mLandmarkImageOn(NULL),  	mLandmarkImageOff(NULL),  	mIconMaturityGeneral(NULL), -	mIconMaturityAdult(NULL) +	mIconMaturityAdult(NULL), +	mIconMaturityModerate(NULL), +	mMaturityHelpTopic(p.maturity_help_topic)  {  	// Lets replace default LLLineEditor with LLLocationLineEditor  	// to make needed escaping while copying and cutting url @@ -276,10 +281,15 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)  	{  		mIconMaturityAdult = p.icon_maturity_adult;  	} +	if(p.icon_maturity_moderate()) +	{ +		mIconMaturityModerate = p.icon_maturity_moderate; +	} -	LLIconCtrl::Params maturity_icon = p.maturity_icon; -	mMaturityIcon = LLUICtrlFactory::create<LLIconCtrl>(maturity_icon); -	addChild(mMaturityIcon); +	LLButton::Params maturity_button = p.maturity_button; +	mMaturityButton = LLUICtrlFactory::create<LLButton>(maturity_button); +	addChild(mMaturityButton); +	mMaturityButton->setClickedCallback(boost::bind(&LLLocationInputCtrl::onMaturityButtonClicked, this));  	LLButton::Params for_sale_button = p.for_sale_button;  	for_sale_button.tool_tip = LLTrans::getString("LocationCtrlForSaleTooltip"); @@ -576,7 +586,7 @@ void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent  	if (isHumanReadableLocationVisible)  	{ -		refreshMaturityIcon(); +		refreshMaturityButton();  	}  } @@ -613,6 +623,11 @@ void LLLocationInputCtrl::onAgentParcelChange()  	refresh();  } +void LLLocationInputCtrl::onMaturityButtonClicked() +{ +	LLUI::sHelpImpl->showTopic(mMaturityHelpTopic); +} +  void LLLocationInputCtrl::onLandmarkLoaded(LLLandmark* lm)  {  	(void) lm; @@ -736,7 +751,7 @@ void LLLocationInputCtrl::refreshLocation()  	setText(location_name);  	isHumanReadableLocationVisible = true; -	refreshMaturityIcon(); +	refreshMaturityButton();  }  // returns new right edge @@ -852,37 +867,54 @@ void LLLocationInputCtrl::refreshHealth()  	}  } -void LLLocationInputCtrl::refreshMaturityIcon() +void LLLocationInputCtrl::refreshMaturityButton()  {  	// Updating maturity rating icon.  	LLViewerRegion* region = gAgent.getRegion();  	if (!region)  		return; +	bool button_visible = true; +	LLPointer<LLUIImage> rating_image = NULL; +	std::string rating_tooltip; +  	U8 sim_access = region->getSimAccess();  	switch(sim_access)  	{  	case SIM_ACCESS_PG: -		mMaturityIcon->setValue(mIconMaturityGeneral->getName()); -		mMaturityIcon->setVisible(TRUE); +		rating_image = mIconMaturityGeneral; +		rating_tooltip = LLTrans::getString("LocationCtrlGeneralIconTooltip");  		break;  	case SIM_ACCESS_ADULT: -		mMaturityIcon->setValue(mIconMaturityAdult->getName()); -		mMaturityIcon->setVisible(TRUE); +		rating_image = mIconMaturityAdult; +		rating_tooltip = LLTrans::getString("LocationCtrlAdultIconTooltip"); +		break; + +	case SIM_ACCESS_MATURE: +		rating_image = mIconMaturityModerate; +		rating_tooltip = LLTrans::getString("LocationCtrlModerateIconTooltip");  		break;  	default: -		mMaturityIcon->setVisible(FALSE); +		button_visible = false; +		break;  	} -	if (mMaturityIcon->getVisible()) +	mMaturityButton->setVisible(button_visible); +	mMaturityButton->setToolTip(rating_tooltip); +	if(rating_image) +	{ +		mMaturityButton->setImageUnselected(rating_image); +		mMaturityButton->setImagePressed(rating_image); +	} +	if (mMaturityButton->getVisible())  	{ -		positionMaturityIcon(); +		positionMaturityButton();  	}  } -void LLLocationInputCtrl::positionMaturityIcon() +void LLLocationInputCtrl::positionMaturityButton()  {  	const LLFontGL* font = mTextEntry->getFont();  	if (!font) @@ -894,11 +926,11 @@ void LLLocationInputCtrl::positionMaturityIcon()  	// Calculate the right edge of rendered text + a whitespace.  	left_pad = left_pad + font->getWidth(mTextEntry->getText()) + font->getWidth(" "); -	LLRect rect = mMaturityIcon->getRect(); -	mMaturityIcon->setRect(rect.setOriginAndSize(left_pad, rect.mBottom, rect.getWidth(), rect.getHeight())); +	LLRect rect = mMaturityButton->getRect(); +	mMaturityButton->setRect(rect.setOriginAndSize(left_pad, rect.mBottom, rect.getWidth(), rect.getHeight()));  	// Hide icon if it text area is not width enough to display it, show otherwise. -	mMaturityIcon->setVisible(rect.mRight < mTextEntry->getRect().getWidth() - right_pad); +	mMaturityButton->setVisible(rect.mRight < mTextEntry->getRect().getWidth() - right_pad);  }  void LLLocationInputCtrl::rebuildLocationHistory(const std::string& filter) @@ -1014,7 +1046,7 @@ void LLLocationInputCtrl::changeLocationPresentation()  		mTextEntry->setText(LLAgentUI::buildSLURL(false));  		mTextEntry->selectAll(); -		mMaturityIcon->setVisible(FALSE); +		mMaturityButton->setVisible(FALSE);  		isHumanReadableLocationVisible = false;  	} diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index 6368bf5cf2..fc7adf60b0 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -2,25 +2,31 @@   * @file lllocationinputctrl.h   * @brief Combobox-like location input control   * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + *  + * Copyright (c) 2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 9611c286eb..d605d4430e 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -81,7 +81,7 @@ void LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos,  	item.enabled = enabled;  	item.target = INDIVIDUAL; -	addNameItemRow(item, pos); +	addNameItemRow(item, pos, suffix);  }  // virtual, public diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index e11df06d86..0341f2c693 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -375,7 +375,6 @@ void LLNavigationBar::draw()  	if(mPurgeTPHistoryItems)  	{  		LLTeleportHistory::getInstance()->purgeItems(); -		onTeleportHistoryChanged();  		mPurgeTPHistoryItems = false;  	} diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index 6808642505..eb53d295b2 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -2,25 +2,31 @@   * @file llnetmap.h   * @brief A little map of the world with network information   * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2001&license=viewergpl$ + *  + * Copyright (c) 2001-2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp index fb1adc7ddf..316ff4324c 100644 --- a/indra/newview/llnotificationstorage.cpp +++ b/indra/newview/llnotificationstorage.cpp @@ -2,25 +2,31 @@  * @file llnotificationstorage.cpp  * @brief LLPersistentNotificationStorage class implementation  * -* $LicenseInfo:firstyear=2010&license=viewerlgpl$ +* $LicenseInfo:firstyear=2010&license=viewergpl$ +* +* Copyright (c) 2010, Linden Research, Inc. +*  * 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 +* 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$  */ @@ -106,8 +112,8 @@ void LLPersistentNotificationStorage::saveNotifications()  		LLNotificationPtr notification = *it;  		// After a notification was placed in Persist channel, it can become -		// responded, expired or canceled - in this case we are should not save it -		if(notification->isRespondedTo() || notification->isCancelled() +		// responded, expired - in this case we are should not save it +		if(notification->isRespondedTo()  			|| notification->isExpired())  		{  			continue; @@ -202,6 +208,7 @@ LLNotificationResponderInterface* LLResponderRegistry::createResponder(const std  	build_map_t::const_iterator it = sBuildMap.find(notification_name);  	if(sBuildMap.end() == it)  	{ +		llwarns << "Responder for notification \'" << notification_name << "\' is not registered" << llendl;  		return NULL;  	}  	responder_constructor_t ctr = it->second; diff --git a/indra/newview/llnotificationstorage.h b/indra/newview/llnotificationstorage.h index 8635c797c0..5050781a85 100644 --- a/indra/newview/llnotificationstorage.h +++ b/indra/newview/llnotificationstorage.h @@ -2,25 +2,31 @@  * @file llnotificationstorage.h  * @brief LLNotificationStorage class declaration  * -* $LicenseInfo:firstyear=2010&license=viewerlgpl$ +* $LicenseInfo:firstyear=2010&license=viewergpl$ +* +* Copyright (c) 2010, Linden Research, Inc. +*  * 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 +* 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$  */ diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index e528f871af..df6f04b6ea 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -45,38 +45,6 @@  using namespace LLNotificationsUI; -class LLOnlineStatusToast : public LLPanelTipToast -{ -public: - -	struct Params -	{ -		LLNotificationPtr	notification; -		LLUUID				avatar_id; -		std::string			message; - -		Params() {} -	}; - -	LLOnlineStatusToast(Params& p) : LLPanelTipToast(p.notification) -	{ -		LLUICtrlFactory::getInstance()->buildPanel(this, "panel_online_status_toast.xml"); - -		childSetValue("avatar_icon", p.avatar_id); -		childSetValue("message", p.message); - -		if (p.notification->getPayload().has("respond_on_mousedown")  -			&& p.notification->getPayload()["respond_on_mousedown"] ) -		{ -			setMouseDownCallback(boost::bind(&LLNotification::respond, p.notification,  -				p.notification->getResponseTemplate())); -		} - -		// set line max count to 3 in case of a very long name -		snapToMessageHeight(getChild<LLTextBox>("message"), 3); -	} -}; -  //--------------------------------------------------------------------------  LLTipHandler::LLTipHandler(e_notification_type type, const LLSD& id)  { @@ -157,28 +125,7 @@ bool LLTipHandler::processNotification(const LLSD& notify)  			return true;  		} -		LLToastPanel* notify_box = NULL; -		// TODO: this should be implemented in LLToastPanel::buidPanelFromNotification -		if("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName()) -		{ -			LLOnlineStatusToast::Params p; -			p.notification = notification; -			p.message = notification->getMessage(); -			p.avatar_id = notification->getPayload()["FROM_ID"]; -			notify_box = new LLOnlineStatusToast(p); -		} -		else -		{ -			notify_box = LLToastPanel::buidPanelFromNotification(notification); -		} - -		// TODO: this if statement should be removed  after modification of -		// LLToastPanel::buidPanelFromNotification() to allow create generic tip panel -		// for all tip notifications except FriendOnline and FriendOffline -		if (notify_box == NULL) -		{ -			notify_box = new LLToastNotifyPanel(notification); -		} +		LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification);  		LLToast::Params p;  		p.notif_id = notification->getID(); diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 3eda077b87..1215272685 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -2,25 +2,30 @@   * @file lloutfitslist.cpp   * @brief List of agent's outfits for My Appearance side panel.   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + *   * 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 + * 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$   */ @@ -31,373 +36,76 @@  // llcommon  #include "llcommonutils.h" +// llcommon +#include "llcommonutils.h" +  #include "llaccordionctrl.h"  #include "llaccordionctrltab.h" -#include "llagentwearables.h" -#include "llappearancemgr.h"  #include "llinventoryfunctions.h"  #include "llinventorymodel.h" -#include "lllistcontextmenu.h" -#include "llnotificationsutil.h" -#include "lloutfitobserver.h" -#include "llsidetray.h" -#include "lltransutil.h" -#include "llviewermenu.h" -#include "llvoavatar.h" -#include "llvoavatarself.h"  #include "llwearableitemslist.h" -static bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y); - -static const LLOutfitTabNameComparator OUTFIT_TAB_NAME_COMPARATOR; - -/*virtual*/ -bool LLOutfitTabNameComparator::compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const -{ -	std::string name1 = tab1->getTitle(); -	std::string name2 = tab2->getTitle(); - -	LLStringUtil::toUpper(name1); -	LLStringUtil::toUpper(name2); - -	return name1 < name2; -} - -////////////////////////////////////////////////////////////////////////// - -class LLOutfitListGearMenu -{ -public: -	LLOutfitListGearMenu(LLOutfitsList* olist) -	:	mOutfitList(olist), -		mMenu(NULL) -	{ -		llassert_always(mOutfitList); - -		LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; -		LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; - -		registrar.add("Gear.Wear", boost::bind(&LLOutfitListGearMenu::onWear, this)); -		registrar.add("Gear.TakeOff", boost::bind(&LLOutfitListGearMenu::onTakeOff, this)); -		registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this)); -		registrar.add("Gear.Delete", boost::bind(&LLOutfitListGearMenu::onDelete, this)); -		registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2)); - -		registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenu::onAdd, this)); - -		enable_registrar.add("Gear.OnEnable", boost::bind(&LLOutfitsList::isActionEnabled, mOutfitList, _2)); -		enable_registrar.add("Gear.OnVisible", boost::bind(&LLOutfitListGearMenu::onVisible, this, _2)); - -		mMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>( -			"menu_outfit_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); -		llassert(mMenu); -	} - -	void show(LLView* spawning_view) -	{ -		if (!mMenu) return; - -		updateItemsVisibility(); -		mMenu->buildDrawLabels(); -		mMenu->updateParent(LLMenuGL::sMenuContainer); -		S32 menu_x = 0; -		S32 menu_y = spawning_view->getRect().getHeight() + mMenu->getRect().getHeight(); -		LLMenuGL::showPopup(spawning_view, mMenu, menu_x, menu_y); -	} - -	void updateItemsVisibility() -	{ -		if (!mMenu) return; - -		bool have_selection = getSelectedOutfitID().notNull(); -		mMenu->setItemVisible("sepatator1", have_selection); -		mMenu->setItemVisible("sepatator2", have_selection); -		mMenu->arrangeAndClear(); // update menu height -	} - -private: -	const LLUUID& getSelectedOutfitID() -	{ -		return mOutfitList->getSelectedOutfitUUID(); -	} - -	LLViewerInventoryCategory* getSelectedOutfit() -	{ -		const LLUUID& selected_outfit_id = getSelectedOutfitID(); -		if (selected_outfit_id.isNull()) -		{ -			return NULL; -		} - -		LLViewerInventoryCategory* cat = gInventory.getCategory(selected_outfit_id); -		return cat; -	} - -	void onWear() -	{ -		LLViewerInventoryCategory* selected_outfit = getSelectedOutfit(); -		if (selected_outfit) -		{ -			LLAppearanceMgr::instance().wearInventoryCategory( -				selected_outfit, /*copy=*/ FALSE, /*append=*/ FALSE); -		} -	} - -	void onAdd() -	{ -		const LLUUID& selected_id = getSelectedOutfitID(); - -		if (selected_id.notNull()) -		{ -			LLAppearanceMgr::getInstance()->addCategoryToCurrentOutfit(selected_id); -		} -	} - -	void onTakeOff() -	{ -		// Take off selected items if there are any -		if (mOutfitList->hasItemSelected()) -		{ -			uuid_vec_t selected_uuids; -			mOutfitList->getSelectedItemsUUIDs(selected_uuids); - -			for (uuid_vec_t::const_iterator it=selected_uuids.begin(); it != selected_uuids.end(); ++it) -			{ -				if (get_is_item_worn(*it)) -				{ -					LLAppearanceMgr::instance().removeItemFromAvatar(*it); -				} -			} -		} -		else // or take off the whole selected outfit if no items specified. -		{ -			const LLUUID& selected_outfit_id = getSelectedOutfitID(); -			if (selected_outfit_id.notNull()) -			{ -				LLAppearanceMgr::instance().takeOffOutfit(selected_outfit_id); -			} -		} -	} - -	void onRename() -	{ -		const LLUUID& selected_outfit_id = getSelectedOutfitID(); -		if (selected_outfit_id.notNull()) -		{ -			LLAppearanceMgr::instance().renameOutfit(selected_outfit_id); -		} -	} - -	void onDelete() -	{ -		const LLUUID& selected_outfit_id = getSelectedOutfitID(); -		if (selected_outfit_id.notNull()) -		{ -			remove_category(&gInventory, selected_outfit_id); -		} -	} - -	void onCreate(const LLSD& data) -	{ -		LLWearableType::EType type = LLWearableType::typeNameToType(data.asString()); -		if (type == LLWearableType::WT_NONE) -		{ -			llwarns << "Invalid wearable type" << llendl; -			return; -		} - -		LLAgentWearables::createWearable(type, true); -	} - -	bool onVisible(LLSD::String param) -	{ -		const LLUUID& selected_outfit_id = getSelectedOutfitID(); -		if (selected_outfit_id.isNull()) // no selection or invalid outfit selected -		{ -			return false; -		} - -		// *TODO This condition leads to menu item behavior inconsistent with -		// "Wear" button behavior and should be modified or removed. -		bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == selected_outfit_id; - -		if ("wear" == param) -		{ -			return !is_worn; -		} - -		return true; -	} - -	LLOutfitsList*	mOutfitList; -	LLMenuGL*		mMenu; -}; - -////////////////////////////////////////////////////////////////////////// - -class LLOutfitContextMenu : public LLListContextMenu -{ -protected: -	/* virtual */ LLContextMenu* createMenu() -	{ -		LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; -		LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; -		LLUUID selected_id = mUUIDs.front(); - -		registrar.add("Outfit.WearReplace", -			boost::bind(&LLAppearanceMgr::replaceCurrentOutfit, &LLAppearanceMgr::instance(), selected_id)); -		registrar.add("Outfit.WearAdd", -			boost::bind(&LLAppearanceMgr::addCategoryToCurrentOutfit, &LLAppearanceMgr::instance(), selected_id)); -		registrar.add("Outfit.TakeOff", -				boost::bind(&LLAppearanceMgr::takeOffOutfit, &LLAppearanceMgr::instance(), selected_id)); -		registrar.add("Outfit.Edit", boost::bind(editOutfit)); -		registrar.add("Outfit.Rename", boost::bind(renameOutfit, selected_id)); -		registrar.add("Outfit.Delete", boost::bind(deleteOutfit, selected_id)); - -		enable_registrar.add("Outfit.OnEnable", boost::bind(&LLOutfitContextMenu::onEnable, this, _2)); -		enable_registrar.add("Outfit.OnVisible", boost::bind(&LLOutfitContextMenu::onVisible, this, _2)); - -		return createFromFile("menu_outfit_tab.xml"); -	} - -	bool onEnable(LLSD::String param) -	{ -		LLUUID outfit_cat_id = mUUIDs.back(); - -		if ("rename" == param) -		{ -			return get_is_category_renameable(&gInventory, outfit_cat_id); -		} -		else if ("wear_replace" == param) -		{ -			return LLAppearanceMgr::instance().getCanReplaceCOF(outfit_cat_id); -		} -		else if ("wear_add" == param) -		{ -			return LLAppearanceMgr::getCanAddToCOF(outfit_cat_id); -		} -		else if ("take_off" == param) -		{ -			return LLAppearanceMgr::getCanRemoveFromCOF(outfit_cat_id); -		} - -		return true; -	} - -	bool onVisible(LLSD::String param) -	{ -		LLUUID outfit_cat_id = mUUIDs.back(); -		bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == outfit_cat_id; - -		if ("edit" == param) -		{ -			return is_worn; -		} -		else if ("wear_replace" == param) -		{ -			return !is_worn; -		} -		else if ("delete" == param) -		{ -			return LLAppearanceMgr::instance().getCanRemoveOutfit(outfit_cat_id); -		} - -		return true; -	} - -	static void editOutfit() -	{ -		LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); -	} - -	static void renameOutfit(const LLUUID& outfit_cat_id) -	{ -		LLAppearanceMgr::instance().renameOutfit(outfit_cat_id); -	} - -	static void deleteOutfit(const LLUUID& outfit_cat_id) -	{ -		remove_category(&gInventory, outfit_cat_id); -	} -}; - -////////////////////////////////////////////////////////////////////////// -  static LLRegisterPanelClassWrapper<LLOutfitsList> t_outfits_list("outfits_list");  LLOutfitsList::LLOutfitsList() -	:	LLPanelAppearanceTab() +	:	LLPanel()  	,	mAccordion(NULL)  	,	mListCommands(NULL) -	,	mIsInitialized(false) -	,	mItemSelected(false)  {  	mCategoriesObserver = new LLInventoryCategoriesObserver(); +	gInventory.addObserver(mCategoriesObserver); -	mGearMenu = new LLOutfitListGearMenu(this); -	mOutfitMenu = new LLOutfitContextMenu(); +	gInventory.addObserver(this);  }  LLOutfitsList::~LLOutfitsList()  { -	delete mGearMenu; -	delete mOutfitMenu; -  	if (gInventory.containsObserver(mCategoriesObserver))  	{  		gInventory.removeObserver(mCategoriesObserver);  		delete mCategoriesObserver;  	} + +	if (gInventory.containsObserver(this)) +	{ +		gInventory.removeObserver(this); +	}  }  BOOL LLOutfitsList::postBuild()  {  	mAccordion = getChild<LLAccordionCtrl>("outfits_accordion"); -	mAccordion->setComparator(&OUTFIT_TAB_NAME_COMPARATOR);  	return TRUE;  }  //virtual -void LLOutfitsList::onOpen(const LLSD& /*info*/) +void LLOutfitsList::changed(U32 mask)  { -	if (!mIsInitialized) -	{ -		// *TODO: I'm not sure is this check necessary but it never match while developing. -		if (!gInventory.isInventoryUsable()) -			return; - -		const LLUUID outfits = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); - -		// *TODO: I'm not sure is this check necessary but it never match while developing. -		LLViewerInventoryCategory* category = gInventory.getCategory(outfits); -		if (!category) -			return; +	if (!gInventory.isInventoryUsable()) +		return; -		gInventory.addObserver(mCategoriesObserver); +	const LLUUID outfits = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); +	LLViewerInventoryCategory* category = gInventory.getCategory(outfits); +	if (!category) +		return; -		// Start observing changes in "My Outfits" category. -		mCategoriesObserver->addCategory(outfits, +	// Start observing changes in "My Outfits" category. +	mCategoriesObserver->addCategory(outfits,  			boost::bind(&LLOutfitsList::refreshList, this, outfits)); -		const LLUUID cof = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); - -		// Start observing changes in Current Outfit category. -		mCategoriesObserver->addCategory(cof, boost::bind(&LLOutfitsList::onCOFChanged, this)); - -		LLOutfitObserver::instance().addBOFChangedCallback(boost::bind(&LLOutfitsList::highlightBaseOutfit, this)); -		LLOutfitObserver::instance().addBOFReplacedCallback(boost::bind(&LLOutfitsList::highlightBaseOutfit, this)); - -		// Fetch "My Outfits" contents and refresh the list to display -		// initially fetched items. If not all items are fetched now -		// the observer will refresh the list as soon as the new items -		// arrive. -		category->fetch(); -		refreshList(outfits); -		highlightBaseOutfit(); +	// Fetch "My Outfits" contents and refresh the list to display +	// initially fetched items. If not all items are fetched now +	// the observer will refresh the list as soon as the new items +	// arrive. +	category->fetch(); +	refreshList(outfits); -		mIsInitialized = true; -	} +	// This observer is used to start the initial outfits fetch +	// when inventory becomes usable. It is no longer needed because +	// "My Outfits" category is now observed by +	// LLInventoryCategoriesObserver. +	gInventory.removeObserver(this);  }  void LLOutfitsList::refreshList(const LLUUID& category_id) @@ -427,57 +135,30 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)  	{  		const LLUUID cat_id = (*iter);  		LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id); -		if (!cat) continue; +		if (!cat) +			continue;  		std::string name = cat->getName();  		static LLXMLNodePtr accordionXmlNode = getAccordionTabXMLNode(); -		LLAccordionCtrlTab* tab = LLUICtrlFactory::defaultBuilder<LLAccordionCtrlTab>(accordionXmlNode, NULL, NULL); -		tab->setName(name); -		tab->setTitle(name); +		accordionXmlNode->setAttributeString("name", name); +		accordionXmlNode->setAttributeString("title", name); +		LLAccordionCtrlTab* tab = LLUICtrlFactory::defaultBuilder<LLAccordionCtrlTab>(accordionXmlNode, NULL, NULL);  		// *TODO: LLUICtrlFactory::defaultBuilder does not use "display_children" from xml. Should be investigated.  		tab->setDisplayChildren(false);  		mAccordion->addCollapsibleCtrl(tab); -		// Start observing the new outfit category. -		LLWearableItemsList* list  = tab->getChild<LLWearableItemsList>("wearable_items_list"); -		if (!mCategoriesObserver->addCategory(cat_id, boost::bind(&LLWearableItemsList::updateList, list, cat_id))) -		{ -			// Remove accordion tab if category could not be added to observer. -			mAccordion->removeCollapsibleCtrl(tab); - -			// kill removed tab -			if (tab != NULL) -			{ -				tab->die(); -			} -			continue; -		} -  		// Map the new tab with outfit category UUID.  		mOutfitsMap.insert(LLOutfitsList::outfits_map_value_t(cat_id, tab)); -		tab->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onAccordionTabRightClick, this, -			_1, _2, _3, cat_id)); - -		// Setting tab focus callback to monitor currently selected outfit. -		tab->setFocusReceivedCallback(boost::bind(&LLOutfitsList::changeOutfitSelection, this, list, cat_id)); - -		// Setting callback to reset items selection inside outfit on accordion collapsing and expanding (EXT-7875) -		tab->setDropDownStateChangedCallback(boost::bind(&LLOutfitsList::resetItemSelection, this, list, cat_id)); - -		// force showing list items that don't match current filter(EXT-7158) -		list->setForceShowingUnmatchedItems(true); - -		// Setting list commit callback to monitor currently selected wearable item. -		list->setCommitCallback(boost::bind(&LLOutfitsList::onSelectionChange, this, _1)); - -		// Setting list refresh callback to apply filter on list change. -		list->setRefreshCompleteCallback(boost::bind(&LLOutfitsList::onFilteredWearableItemsListRefresh, this, _1)); +		// Start observing the new outfit category. +		LLWearableItemsList* list  = tab->getChild<LLWearableItemsList>("wearable_items_list"); +		mCategoriesObserver->addCategory(cat_id, boost::bind(&LLWearableItemsList::updateList, list, cat_id)); -		list->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onWearableItemsListRightClick, this, _1, _2, _3)); +		// Setting drop down callback to monitor currently selected outfit. +		tab->setDropDownStateChangedCallback(boost::bind(&LLOutfitsList::onTabExpandedCollapsed, this, list));  		// Fetch the new outfit contents.  		cat->fetch(); @@ -485,50 +166,23 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)  		// Refresh the list of outfit items after fetch().  		// Further list updates will be triggered by the category observer.  		list->updateList(cat_id); - -		// If filter is currently applied we store the initial tab state and -		// open it to show matched items if any. -		if (!sFilterSubString.empty()) -		{ -			tab->notifyChildren(LLSD().with("action","store_state")); -			tab->setDisplayChildren(true); - -			// Setting mForceRefresh flag will make the list refresh its contents -			// even if it is not currently visible. This is required to apply the -			// filter to the newly added list. -			list->setForceRefresh(true); - -			list->setFilterSubString(sFilterSubString); -		}  	}  	// Handle removed tabs. -	for (uuid_vec_t::const_iterator iter=vremoved.begin(); iter != vremoved.end(); ++iter) +	for (uuid_vec_t::const_iterator iter=vremoved.begin(); iter != vremoved.end(); iter++)  	{  		outfits_map_t::iterator outfits_iter = mOutfitsMap.find((*iter));  		if (outfits_iter != mOutfitsMap.end())  		{ -			const LLUUID& outfit_id = outfits_iter->first; -			LLAccordionCtrlTab* tab = outfits_iter->second; -  			// An outfit is removed from the list. Do the following: -			// 1. Remove outfit category from observer to stop monitoring its changes. -			mCategoriesObserver->removeCategory(outfit_id); +			// 1. Remove outfit accordion tab from accordion. +			mAccordion->removeCollapsibleCtrl(outfits_iter->second); -			// 2. Remove the outfit from selection. -			deselectOutfit(outfit_id); +			// 2. Remove outfit category from observer to stop monitoring its changes. +			mCategoriesObserver->removeCategory(outfits_iter->first);  			// 3. Remove category UUID to accordion tab mapping.  			mOutfitsMap.erase(outfits_iter); - -			// 4. Remove outfit tab from accordion. -			mAccordion->removeCollapsibleCtrl(tab); - -			// kill removed tab -			if (tab != NULL) -			{ -				tab->die(); -			}  		}  	} @@ -542,185 +196,50 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)  		updateOutfitTab(*items_iter);  	} -	mAccordion->sort(); -} - -void LLOutfitsList::highlightBaseOutfit() -{ -	// id of base outfit -	LLUUID base_id = LLAppearanceMgr::getInstance()->getBaseOutfitUUID(); -	if (base_id != mHighlightedOutfitUUID) -	{ -		if (mOutfitsMap[mHighlightedOutfitUUID]) -		{ -			mOutfitsMap[mHighlightedOutfitUUID]->setTitleFontStyle("NORMAL"); -			mOutfitsMap[mHighlightedOutfitUUID]->setTitleColor(LLUIColorTable::instance().getColor("AccordionHeaderTextColor")); -		} - -		mHighlightedOutfitUUID = base_id; -	} -	if (mOutfitsMap[base_id]) -	{ -		mOutfitsMap[base_id]->setTitleFontStyle("BOLD"); -		mOutfitsMap[base_id]->setTitleColor(LLUIColorTable::instance().getColor("SelectedOutfitTextColor")); -	} -} - -void LLOutfitsList::onSelectionChange(LLUICtrl* ctrl) -{ -	LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(ctrl); -	if (!list) return; - -	LLViewerInventoryItem *item = gInventory.getItem(list->getSelectedUUID()); -	if (!item) return; - -	changeOutfitSelection(list, item->getParentUUID()); -} - -void LLOutfitsList::performAction(std::string action) -{ -	if (mSelectedOutfitUUID.isNull()) return; - -	LLViewerInventoryCategory* cat = gInventory.getCategory(mSelectedOutfitUUID); -	if (!cat) return; - -	if ("replaceoutfit" == action) -	{ -		LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, FALSE ); -	} -	else if ("addtooutfit" == action) -	{ -		LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, TRUE ); -	} -	else if ("rename_outfit" == action) -	{ -		LLAppearanceMgr::instance().renameOutfit(mSelectedOutfitUUID); -	} -} - -void LLOutfitsList::removeSelected() -{ -	if (mSelectedOutfitUUID.notNull()) -	{ -		remove_category(&gInventory, mSelectedOutfitUUID); -	} +	mAccordion->arrange();  } -void LLOutfitsList::setSelectedOutfitByUUID(const LLUUID& outfit_uuid) +void LLOutfitsList::updateOutfitTab(const LLUUID& category_id)  { -	for (outfits_map_t::iterator iter = mOutfitsMap.begin(); -			iter != mOutfitsMap.end(); -			++iter) +	outfits_map_t::iterator outfits_iter = mOutfitsMap.find(category_id); +	if (outfits_iter != mOutfitsMap.end())  	{ -		if (outfit_uuid == iter->first) -		{ -			LLAccordionCtrlTab* tab = iter->second; -			if (!tab) continue; - -			LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); -			if (!list) continue; - -			tab->setFocus(TRUE); -			changeOutfitSelection(list, outfit_uuid); - -			tab->setDisplayChildren(true); -		} -	} -} - -// virtual -void LLOutfitsList::setFilterSubString(const std::string& string) -{ -	applyFilter(string); - -	sFilterSubString = string; -} +		LLViewerInventoryCategory *cat = gInventory.getCategory(category_id); +		if (!cat) +			return; -// virtual -bool LLOutfitsList::isActionEnabled(const LLSD& userdata) -{ -	if (mSelectedOutfitUUID.isNull()) return false; +		std::string name = cat->getName(); -	const std::string command_name = userdata.asString(); -	if (command_name == "delete") -	{ -		return !mItemSelected && LLAppearanceMgr::instance().getCanRemoveOutfit(mSelectedOutfitUUID); -	} -	if (command_name == "rename") -	{ -		return get_is_category_renameable(&gInventory, mSelectedOutfitUUID); -	} -	if (command_name == "save_outfit") -	{ -		bool outfit_locked = LLAppearanceMgr::getInstance()->isOutfitLocked(); -		bool outfit_dirty = LLAppearanceMgr::getInstance()->isOutfitDirty(); -		// allow save only if outfit isn't locked and is dirty -		return !outfit_locked && outfit_dirty; -	} -	if (command_name == "wear") -	{ -		if (gAgentWearables.isCOFChangeInProgress()) +		// Update tab name with the new category name. +		LLAccordionCtrlTab* tab = outfits_iter->second; +		if (tab)  		{ -			return false; +			tab->setName(name);  		} -		if (hasItemSelected()) +		// Update tab title with the new category name using textbox +		// in accordion tab header. +		LLTextBox* tab_title = tab->findChild<LLTextBox>("dd_textbox"); +		if (tab_title)  		{ -			return canWearSelected(); +			tab_title->setText(name);  		} - -		// outfit selected -		return LLAppearanceMgr::instance().getCanReplaceCOF(mSelectedOutfitUUID);  	} -	if (command_name == "take_off") -	{ -		// Enable "Take Off" if any of selected items can be taken off -		// or the selected outfit contains items that can be taken off. -		return ( hasItemSelected() && canTakeOffSelected() ) -				|| ( !hasItemSelected() && LLAppearanceMgr::getCanRemoveFromCOF(mSelectedOutfitUUID) ); -	} - -	if (command_name == "wear_add") -	{ -		// *TODO: do we ever get here? -		return LLAppearanceMgr::getCanAddToCOF(mSelectedOutfitUUID); -	} - -	return false;  } -// virtual -void LLOutfitsList::showGearMenu(LLView* spawning_view) +void LLOutfitsList::onTabExpandedCollapsed(LLWearableItemsList* list)  { -	if (!mGearMenu) return; -	mGearMenu->show(spawning_view); -} - -void LLOutfitsList::getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const -{ -	// Collect selected items from all selected lists. -	for (wearables_lists_map_t::const_iterator iter = mSelectedListsMap.begin(); -			iter != mSelectedListsMap.end(); -			++iter) -	{ -		uuid_vec_t uuids; -		(*iter).second->getSelectedUUIDs(uuids); +	if (!list) +		return; -		S32 prev_size = selected_uuids.size(); -		selected_uuids.resize(prev_size + uuids.size()); -		std::copy(uuids.begin(), uuids.end(), selected_uuids.begin() + prev_size); -	} +	// TODO: Add outfit selection handling.  } -boost::signals2::connection LLOutfitsList::setSelectionChangeCallback(selection_change_callback_t cb) +void LLOutfitsList::setFilterSubString(const std::string& string)  { -	return mSelectionChangeSignal.connect(cb); +	mFilterSubString = string;  } -bool LLOutfitsList::hasItemSelected() -{ -	return mItemSelected; -}  //////////////////////////////////////////////////////////////////////////  // Private methods @@ -764,333 +283,4 @@ void LLOutfitsList::computeDifference(  	LLCommonUtils::computeDifference(vnew, vcur, vadded, vremoved);  } -void LLOutfitsList::updateOutfitTab(const LLUUID& category_id) -{ -	outfits_map_t::iterator outfits_iter = mOutfitsMap.find(category_id); -	if (outfits_iter != mOutfitsMap.end()) -	{ -		LLViewerInventoryCategory *cat = gInventory.getCategory(category_id); -		if (!cat) return; - -		std::string name = cat->getName(); - -		// Update tab name with the new category name. -		LLAccordionCtrlTab* tab = outfits_iter->second; -		if (tab) -		{ -			tab->setName(name); -			tab->setTitle(name); -		} -	} -} - -void LLOutfitsList::resetItemSelection(LLWearableItemsList* list, const LLUUID& category_id) -{ -	list->resetSelection(); -	mItemSelected = false; -	setSelectedOutfitUUID(category_id); -} - -void LLOutfitsList::changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id) -{ -	MASK mask = gKeyboard->currentMask(TRUE); - -	// Reset selection in all previously selected tabs except for the current -	// if new selection is started. -	if (list && !(mask & MASK_CONTROL)) -	{ -		for (wearables_lists_map_t::iterator iter = mSelectedListsMap.begin(); -				iter != mSelectedListsMap.end(); -				++iter) -		{ -			LLWearableItemsList* selected_list = (*iter).second; -			if (selected_list != list) -			{ -				selected_list->resetSelection(); -			} -		} - -		// Clear current selection. -		mSelectedListsMap.clear(); -	} - -	mItemSelected = list && (list->getSelectedItem() != NULL); - -	mSelectedListsMap.insert(wearables_lists_map_value_t(category_id, list)); -	setSelectedOutfitUUID(category_id); -} - -void LLOutfitsList::setSelectedOutfitUUID(const LLUUID& category_id) -{ -	mSelectionChangeSignal(mSelectedOutfitUUID = category_id); -} - -void LLOutfitsList::deselectOutfit(const LLUUID& category_id) -{ -	// Remove selected lists map entry. -	mSelectedListsMap.erase(category_id); - -	// Reset selection if the outfit is selected. -	if (category_id == mSelectedOutfitUUID) -	{ -		setSelectedOutfitUUID(LLUUID::null); -	} -} - -void LLOutfitsList::restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id) -{ -	// Try restoring outfit selection after filtering. -	if (mAccordion->getSelectedTab() == tab) -	{ -		setSelectedOutfitUUID(category_id); -	} -} - -void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl) -{ -	if (!ctrl || sFilterSubString.empty()) -		return; - -	for (outfits_map_t::iterator -			 iter = mOutfitsMap.begin(), -			 iter_end = mOutfitsMap.end(); -		 iter != iter_end; ++iter) -	{ -		LLAccordionCtrlTab* tab = iter->second; -		if (!tab) continue; - -		LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); -		if (list != ctrl) continue; - -		applyFilterToTab(iter->first, tab, sFilterSubString); -	} -} - -void LLOutfitsList::applyFilter(const std::string& new_filter_substring) -{ -	mAccordion->setFilterSubString(new_filter_substring); - -	for (outfits_map_t::iterator -			 iter = mOutfitsMap.begin(), -			 iter_end = mOutfitsMap.end(); -		 iter != iter_end; ++iter) -	{ -		LLAccordionCtrlTab* tab = iter->second; -		if (!tab) continue; - -		bool more_restrictive = sFilterSubString.size() < new_filter_substring.size() && !new_filter_substring.substr(0, sFilterSubString.size()).compare(sFilterSubString); - -		// Restore tab visibility in case of less restrictive filter -		// to compare it with updated string if it was previously hidden. -		if (!more_restrictive) -		{ -			tab->setVisible(TRUE); -		} - -		LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); -		if (list) -		{ -			list->setFilterSubString(new_filter_substring); -		} - -		if(sFilterSubString.empty() && !new_filter_substring.empty()) -		{ -			//store accordion tab state when filter is not empty -			tab->notifyChildren(LLSD().with("action","store_state")); -		} - -		if (!new_filter_substring.empty()) -		{ -			applyFilterToTab(iter->first, tab, new_filter_substring); -		} -		else -		{ -			// restore tab title when filter is empty -			tab->setTitle(tab->getTitle()); - -			//restore accordion state after all those accodrion tab manipulations -			tab->notifyChildren(LLSD().with("action","restore_state")); - -			// Try restoring the tab selection. -			restoreOutfitSelection(tab, iter->first); -		} -	} - -	mAccordion->arrange(); -} - -void LLOutfitsList::applyFilterToTab( -	const LLUUID&		category_id, -	LLAccordionCtrlTab*	tab, -	const std::string&	filter_substring) -{ -	if (!tab) return; -	LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); -	if (!list) return; - -	std::string title = tab->getTitle(); -	LLStringUtil::toUpper(title); - -	std::string cur_filter = filter_substring; -	LLStringUtil::toUpper(cur_filter); - -	tab->setTitle(tab->getTitle(), cur_filter); - -	if (std::string::npos == title.find(cur_filter)) -	{ -		// hide tab if its title doesn't pass filter -		// and it has no visible items -		tab->setVisible(list->hasMatchedItems()); - -		// remove title highlighting because it might -		// have been previously highlighted by less restrictive filter -		tab->setTitle(tab->getTitle()); - -		// Remove the tab from selection. -		deselectOutfit(category_id); -	} -	else -	{ -		// Try restoring the tab selection. -		restoreOutfitSelection(tab, category_id); -	} - -	if (tab->getVisible()) -	{ -		// Open tab if it has passed the filter. -		tab->setDisplayChildren(true); -	} -	else -	{ -		// Set force refresh flag to refresh not visible list -		// when some changes occur in it. -		list->setForceRefresh(true); -	} -} - -bool LLOutfitsList::canTakeOffSelected() -{ -	uuid_vec_t selected_uuids; -	getSelectedItemsUUIDs(selected_uuids); - -	LLFindWearablesEx is_worn(/*is_worn=*/ true, /*include_body_parts=*/ false); - -	for (uuid_vec_t::const_iterator it=selected_uuids.begin(); it != selected_uuids.end(); ++it) -	{ -		LLViewerInventoryItem* item = gInventory.getItem(*it); -		if (!item) continue; - -		if (is_worn(NULL, item)) return true; -	} -	return false; -} - -bool LLOutfitsList::canWearSelected() -{ -	uuid_vec_t selected_items; -	getSelectedItemsUUIDs(selected_items); - -	for (uuid_vec_t::const_iterator it = selected_items.begin(); it != selected_items.end(); ++it) -	{ -		const LLUUID& id = *it; - -		// Check whether the item is worn. -		if (!get_can_item_be_worn(id)) -		{ -			return false; -		} -	} - -	// All selected items can be worn. -	return true; -} - -void LLOutfitsList::onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id) -{ -	LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl); -	if(mOutfitMenu && is_tab_header_clicked(tab, y) && cat_id.notNull()) -	{ -		// Focus tab header to trigger tab selection change. -		LLUICtrl* header = tab->findChild<LLUICtrl>("dd_header"); -		if (header) -		{ -			header->setFocus(TRUE); -		} - -		uuid_vec_t selected_uuids; -		selected_uuids.push_back(cat_id); -		mOutfitMenu->show(ctrl, selected_uuids, x, y); -	} -} - -void LLOutfitsList::wearSelectedItems() -{ -	uuid_vec_t selected_uuids; -	getSelectedItemsUUIDs(selected_uuids); - -	if(selected_uuids.empty()) -	{ -		return; -	} - -	wear_multiple(selected_uuids, false); -} - -void LLOutfitsList::onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y) -{ -	LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(ctrl); -	if (!list) return; - -	uuid_vec_t selected_uuids; - -	getSelectedItemsUUIDs(selected_uuids); - -	LLWearableItemsList::ContextMenu::instance().show(list, selected_uuids, x, y); -} - -void LLOutfitsList::onCOFChanged() -{ -	LLInventoryModel::changed_items_t changed_linked_items; - -	const LLInventoryModel::changed_items_t& changed_items = gInventory.getChangedIDs(); -	for (LLInventoryModel::changed_items_t::const_iterator iter = changed_items.begin(); -		 iter != changed_items.end(); -		 ++iter) -	{ -		LLViewerInventoryItem* item = gInventory.getItem(*iter); -		if (item) -		{ -			// From gInventory we get the UUIDs of new links added to COF -			// or removed from COF. These links UUIDs are not the same UUIDs -			// that we have in each wearable items list. So we collect base items -			// UUIDs to find all items or links that point to same base items in wearable -			// items lists and update their worn state there. -			changed_linked_items.insert(item->getLinkedUUID()); -		} -	} - -	for (outfits_map_t::iterator iter = mOutfitsMap.begin(); -			iter != mOutfitsMap.end(); -			++iter) -	{ -		LLAccordionCtrlTab* tab = iter->second; -		if (!tab) continue; - -		LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); -		if (!list) continue; - -		// Every list updates the labels of changed items  or -		// the links that point to these items. -		list->updateChangedItems(changed_linked_items); -	} -} - -bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y) -{ -	if(!tab || !tab->getHeaderVisible()) return false; - -	S32 header_bottom = tab->getLocalRect().getHeight() - tab->getHeaderHeight(); -	return y >= header_bottom; -} -  // EOF diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index 25aeab2cb7..2d103ea356 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -2,60 +2,45 @@   * @file lloutfitslist.h   * @brief List of agent's outfits for My Appearance side panel.   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + *   * 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 + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab.  Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE.   * $/LicenseInfo$   */  #ifndef LL_LLOUTFITSLIST_H  #define LL_LLOUTFITSLIST_H -#include "llaccordionctrl.h"  #include "llpanel.h"  // newview  #include "llinventorymodel.h" -#include "llpanelappearancetab.h" +#include "llinventoryobserver.h" +class LLAccordionCtrl;  class LLAccordionCtrlTab; -class LLInventoryCategoriesObserver; -class LLOutfitListGearMenu;  class LLWearableItemsList; -class LLListContextMenu; - - -/** - * @class LLOutfitTabNameComparator - * - * Comparator of outfit tabs. - */ -class LLOutfitTabNameComparator : public LLAccordionCtrl::LLTabComparator -{ -	LOG_CLASS(LLOutfitTabNameComparator); - -public: -	LLOutfitTabNameComparator() {}; -	virtual ~LLOutfitTabNameComparator() {}; - -	/*virtual*/ bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const; -};  /**   * @class LLOutfitsList @@ -63,52 +48,29 @@ public:   * A list of agents's outfits from "My Outfits" inventory category   * which displays each outfit in an accordion tab with a flat list   * of items inside it. - * - * Starts fetching necessary inventory content on first opening. + * Uses LLInventoryCategoriesObserver to monitor changes to "My Outfits" + * inventory category and refresh the outfits listed in it. + * This class is derived from LLInventoryObserver to know when inventory + * becomes usable and it is safe to request data from inventory model.   */ -class LLOutfitsList : public LLPanelAppearanceTab +class LLOutfitsList : public LLPanel, public LLInventoryObserver  {  public: -	typedef boost::function<void (const LLUUID&)> selection_change_callback_t; -	typedef boost::signals2::signal<void (const LLUUID&)> selection_change_signal_t; -  	LLOutfitsList();  	virtual ~LLOutfitsList();  	/*virtual*/ BOOL postBuild(); -	/*virtual*/ void onOpen(const LLSD& info); +	/*virtual*/ void changed(U32 mask);  	void refreshList(const LLUUID& category_id); -	// highlits currently worn outfit tab text and unhighlights previously worn -	void highlightBaseOutfit(); - -	void performAction(std::string action); - -	void removeSelected(); - -	void setSelectedOutfitByUUID(const LLUUID& outfit_uuid); - -	/*virtual*/ void setFilterSubString(const std::string& string); - -	/*virtual*/ bool isActionEnabled(const LLSD& userdata); - -	/*virtual*/ void showGearMenu(LLView* spawning_view); - -	const LLUUID& getSelectedOutfitUUID() const { return mSelectedOutfitUUID; } - -	void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const; - -	boost::signals2::connection setSelectionChangeCallback(selection_change_callback_t cb); +	// Update tab displaying outfit identified by category_id. +	void updateOutfitTab(const LLUUID& category_id); -	// Collects selected items from all selected lists and wears them(if possible- adds, else replaces) -	void wearSelectedItems(); +	void onTabExpandedCollapsed(LLWearableItemsList* list); -	/** -	 * Returns true if there is a selection inside currently selected outfit -	 */ -	bool hasItemSelected(); +	void setFilterSubString(const std::string& string);  private:  	/** @@ -123,100 +85,17 @@ private:  	 */  	void computeDifference(const LLInventoryModel::cat_array_t& vcats, uuid_vec_t& vadded, uuid_vec_t& vremoved); -	/** -	 * Updates tab displaying outfit identified by category_id. -	 */ -	void updateOutfitTab(const LLUUID& category_id); - -	/** -	 * Resets previous selection and stores newly selected list and outfit id. -	 */ -	void changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id); - -	/** -	 *Resets items selection inside outfit -	 */ -	void resetItemSelection(LLWearableItemsList* list, const LLUUID& category_id); - -	/** -	 * Saves newly selected outfit ID. -	 */ -	void setSelectedOutfitUUID(const LLUUID& category_id); - -	/** -	 * Removes the outfit from selection. -	 */ -	void deselectOutfit(const LLUUID& category_id); - -	/** -	 * Try restoring selection for a temporary hidden tab. -	 * -	 * A tab may be hidden if it doesn't match current filter. -	 */ -	void restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id); - -	/** -	 * Called upon list refresh event to update tab visibility depending on -	 * the results of applying filter to the title and list items of the tab. -	 */ -	void onFilteredWearableItemsListRefresh(LLUICtrl* ctrl); - -	/** -	 * Highlights filtered items and hides tabs which haven't passed filter. -	 */ -	void applyFilter(const std::string& new_filter_substring); - -	/** -	 * Applies filter to the given tab -	 * -	 * @see applyFilter() -	 */ -	void applyFilterToTab(const LLUUID& category_id, LLAccordionCtrlTab* tab, const std::string& filter_substring); - -	/** -	 * Returns true if there are any items that can be taken off among currently selected, otherwise false. -	 */ -	bool canTakeOffSelected(); - -	/** -	 * Returns true if all selected items can be worn. -	 */ -	bool canWearSelected(); - -	void onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id); -	void onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y); -	void onCOFChanged(); - -	void onSelectionChange(LLUICtrl* ctrl); - -	static void onOutfitRename(const LLSD& notification, const LLSD& response);  	LLInventoryCategoriesObserver* 	mCategoriesObserver;  	LLAccordionCtrl*				mAccordion;  	LLPanel*						mListCommands; -	typedef	std::map<LLUUID, LLWearableItemsList*>		wearables_lists_map_t; -	typedef wearables_lists_map_t::value_type			wearables_lists_map_value_t; -	wearables_lists_map_t			mSelectedListsMap; - -	LLUUID							mSelectedOutfitUUID; -	// id of currently highlited outfit -	LLUUID							mHighlightedOutfitUUID; -	selection_change_signal_t		mSelectionChangeSignal; +	std::string 					mFilterSubString;  	typedef	std::map<LLUUID, LLAccordionCtrlTab*>		outfits_map_t;  	typedef outfits_map_t::value_type					outfits_map_value_t;  	outfits_map_t					mOutfitsMap; - -	LLOutfitListGearMenu*			mGearMenu; -	LLListContextMenu*				mOutfitMenu; - -	bool							mIsInitialized; -	/** -	 * True if there is a selection inside currently selected outfit -	 */ -	bool							mItemSelected;  };  #endif //LL_LLOUTFITSLIST_H diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index 86875d2da3..359f252383 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -1,25 +1,31 @@  /**    * @file llpanelgroup.h   * - * $LicenseInfo:firstyear=2006&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2006&license=viewergpl$ + *  + * Copyright (c) 2006-2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ @@ -36,7 +42,6 @@ class LLOfferInfo;  const S32 UPDATE_MEMBERS_PER_FRAME = 500;  // Forward declares -class LLAccordionCtrl;  class LLPanelGroupTab;  class LLTabContainer;  class LLAgent; @@ -90,6 +95,9 @@ public:  						   LLOfferInfo* inventory_offer); +	bool	notifyChildren		(const LLSD& info); +	bool	handleNotifyCallback(const LLSD&, const LLSD&); +  protected:  	virtual void update(LLGroupChange gc); @@ -97,7 +105,6 @@ protected:  	void onBackBtnClick();  	void onBtnJoin();  	void onBtnCancel(); -	void onVisibilityChange(const LLSD &in_visible_chain, LLAccordionCtrl* accordion_ctrl);  	static void onBtnApply(void*);  	static void onBtnRefresh(void*); @@ -110,6 +117,9 @@ protected:  protected:  	bool	apply(LLPanelGroupTab* tab); +	bool	canClose(); + +	bool	mShowingNotifyDialog;  	LLTimer mRefreshTimer; @@ -122,6 +132,7 @@ protected:  	LLButton*		mButtonJoin;  	LLUICtrl*		mJoinText; +  };  class LLPanelGroupTab : public LLPanel diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 9ac3a07041..65fe7165c2 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -236,6 +236,7 @@ public:  	std::string mCantViewParcelsText;  	std::string mCantViewAccountsText; +	std::string mEmptyParcelsText;  };  //******************************************* @@ -452,6 +453,7 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)  		// This power was removed to make group roles simpler  		//if ( !gAgent.hasPowerInGroup(mGroupID, GP_LAND_VIEW_OWNED) ) return;  		if (!gAgent.isInGroup(mPanel.mGroupID)) return; +		mGroupParcelsp->setCommentText(mEmptyParcelsText);  		std::string name;  		std::string desc; @@ -696,6 +698,7 @@ BOOL LLPanelGroupLandMoney::postBuild()  	mImplementationp->mCantViewParcelsText = getString("cant_view_group_land_text");  	mImplementationp->mCantViewAccountsText = getString("cant_view_group_accounting_text"); +	mImplementationp->mEmptyParcelsText = getString("epmty_view_group_land_text");  	if ( mImplementationp->mMapButtonp )  	{ diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 8da19d1574..230e484fad 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -517,6 +517,11 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)  	mNoticesList->setEnabled(TRUE); +	//save sort state and set unsorted state to prevent unnecessary  +	//sorting while adding notices +	bool save_sort = mNoticesList->isSorted(); +	mNoticesList->setNeedsSort(false); +  	for (;i<count;++i)  	{  		msg->getUUID("Data","NoticeID",id,i); @@ -527,6 +532,13 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)  			mNoticesList->setEnabled(FALSE);  			return;  		} + +		//with some network delays we can receive notice list more then once... +		//so add only unique notices +		S32 pos = mNoticesList->getItemIndex(id); + +		if(pos!=-1)//if items with this ID already in the list - skip it +			continue;  		msg->getString("Data","Subject",subj,i);  		msg->getString("Data","FromName",name,i); @@ -562,6 +574,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)  		mNoticesList->addElement(row, ADD_BOTTOM);  	} +	mNoticesList->setNeedsSort(save_sort);  	mNoticesList->updateSort();  } @@ -656,6 +669,9 @@ void LLPanelGroupNotices::setGroupID(const LLUUID& id)  	if(mViewMessage)   		mViewMessage->clear(); + +	if(mViewInventoryName) +		mViewInventoryName->clear();  	activate();  } diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 67d40a39b1..0a978d1b26 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -583,6 +583,7 @@ void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list  	if (!inventory_list->getFilter())  		return; +	inventory_list->getFilter()->setEmptyLookupMessage("PlacesNoMatchingItems");  	inventory_list->setFilterTypes(0x1 << LLInventoryType::IT_LANDMARK);  	inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::onSelectionChange, this, inventory_list, _1, _2)); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index ee4dcc44fe..529a368dc3 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -1007,7 +1007,7 @@ void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data)  {  	if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == FALSE)  	{ -		LLNotificationsUtil::add("CapsKeyOn"); +// *TODO: use another way to notify user about enabled caps lock, see EXT-6858  		sCapslockDidNotification = TRUE;  	}  } diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp index 50f0a14995..3f620869e0 100644 --- a/indra/newview/llpanelme.cpp +++ b/indra/newview/llpanelme.cpp @@ -2,25 +2,31 @@   * @file llpanelme.cpp   * @brief Side tray "Me" (My Profile) panel   * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + *  + * Copyright (c) 2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/newview/llpanelme.h b/indra/newview/llpanelme.h index 984ba1e9a2..f2b38de3d6 100644 --- a/indra/newview/llpanelme.h +++ b/indra/newview/llpanelme.h @@ -2,25 +2,31 @@   * @file llpanelme.h   * @brief Side tray "Me" (My Profile) panel   * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + *  + * Copyright (c) 2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ diff --git a/indra/newview/llpanelonlinestatus.cpp b/indra/newview/llpanelonlinestatus.cpp index 08204e7e4d..6ba015b11c 100644 --- a/indra/newview/llpanelonlinestatus.cpp +++ b/indra/newview/llpanelonlinestatus.cpp @@ -2,25 +2,31 @@   * @file llpanelonlinestatus.cpp   * @brief Represents a class of online status tip toast panels.   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + *   * 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 + * 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$   */ @@ -28,7 +34,6 @@  #include "llnotifications.h"  #include "llpanelonlinestatus.h" -#include "llviewercontrol.h" // for gSavedSettings  LLPanelOnlineStatus::LLPanelOnlineStatus(  		const LLNotificationPtr& notification) : @@ -49,7 +54,7 @@ LLPanelOnlineStatus::LLPanelOnlineStatus(  				notification, notification->getResponseTemplate()));  	} -	S32 max_line_count =  gSavedSettings.getS32("TipToastMessageLineCount"); -	snapToMessageHeight(getChild<LLTextBox> ("message"), max_line_count); +	// set line max count to 3 in case of a very long name +	snapToMessageHeight(getChild<LLTextBox> ("message"), 3);  } diff --git a/indra/newview/llpanelonlinestatus.h b/indra/newview/llpanelonlinestatus.h index 7dc648f135..b47050c3a2 100644 --- a/indra/newview/llpanelonlinestatus.h +++ b/indra/newview/llpanelonlinestatus.h @@ -2,25 +2,31 @@   * @file llpanelonlinestatus.h   * @brief Represents a class of online status tip toast panels.   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + *   * 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 + * 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$   */ diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index ce17e1d624..dbccd243da 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -38,7 +38,10 @@  #include "llagent.h"  #include "llagentwearables.h"  #include "llappearancemgr.h" +#include "llcofwearables.h" +#include "llfilteredwearablelist.h"  #include "llinventory.h" +#include "llinventoryitemslist.h"  #include "llviewercontrol.h"  #include "llui.h"  #include "llfloater.h" @@ -71,6 +74,9 @@ const U64 WEARABLE_MASK = (1LL << LLInventoryType::IT_WEARABLE);  const U64 ATTACHMENT_MASK = (1LL << LLInventoryType::IT_ATTACHMENT) | (1LL << LLInventoryType::IT_OBJECT);  const U64 ALL_ITEMS_MASK = WEARABLE_MASK | ATTACHMENT_MASK; +static const std::string SAVE_BTN("save_btn"); +static const std::string REVERT_BTN("revert_btn"); +  class LLInventoryLookObserver : public LLInventoryObserver  {  public: @@ -116,9 +122,15 @@ private:  LLPanelOutfitEdit::LLPanelOutfitEdit() -:	LLPanel(), mCurrentOutfitID(), mFetchLook(NULL), mSearchFilter(NULL), -mLookContents(NULL), mInventoryItemsPanel(NULL), mAddToOutfitBtn(NULL), -mRemoveFromOutfitBtn(NULL), mLookObserver(NULL) +:	LLPanel(),  +	mCurrentOutfitID(), +	mFetchLook(NULL), +	mSearchFilter(NULL), +	mCOFWearables(NULL), +	mInventoryItemsPanel(NULL), +	mAddToOutfitBtn(NULL), +	mRemoveFromOutfitBtn(NULL), +	mLookObserver(NULL)  {  	mSavedFolderState = new LLSaveFolderState();  	mSavedFolderState->setApply(FALSE); @@ -164,10 +176,10 @@ BOOL LLPanelOutfitEdit::postBuild()  	childSetCommitCallback("add_btn", boost::bind(&LLPanelOutfitEdit::showAddWearablesPanel, this), NULL);  	childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL); +	childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredWearablesPanel, this), NULL); -	mLookContents = getChild<LLScrollListCtrl>("look_items_list"); -	mLookContents->sortByColumn("look_item_sort", TRUE); -	mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this)); +	mCOFWearables = getChild<LLCOFWearables>("cof_wearables_list"); +	mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this));  	mInventoryItemsPanel = getChild<LLInventoryPanel>("inventory_items");  	mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK); @@ -200,15 +212,6 @@ BOOL LLPanelOutfitEdit::postBuild()  	childSetAction("add_to_outfit_btn", boost::bind(&LLPanelOutfitEdit::onAddToOutfitClicked, this));  	childSetEnabled("add_to_outfit_btn", false); -	mUpBtn = getChild<LLButton>("up_btn"); -	mUpBtn->setEnabled(TRUE); -	mUpBtn->setClickedCallback(boost::bind(&LLPanelOutfitEdit::onUpClicked, this)); -	 -	//*TODO rename mLookContents to mOutfitContents -	mLookContents = getChild<LLScrollListCtrl>("look_items_list"); -	mLookContents->sortByColumn("look_item_sort", TRUE); -	mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this)); -  	mRemoveFromOutfitBtn = getChild<LLButton>("remove_from_outfit_btn");  	mRemoveFromOutfitBtn->setEnabled(FALSE);  	mRemoveFromOutfitBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onRemoveFromOutfitClicked, this)); @@ -218,10 +221,9 @@ BOOL LLPanelOutfitEdit::postBuild()  	mEditWearableBtn->setVisible(FALSE);  	mEditWearableBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onEditWearableClicked, this)); -	childSetAction("revert_btn", boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance())); +	childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance())); -	childSetAction("save_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false)); -	childSetAction("save_as_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true)); +	childSetAction(SAVE_BTN, boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));  	childSetAction("save_flyout_btn", boost::bind(&LLPanelOutfitEdit::showSaveMenu, this));  	LLUICtrl::CommitCallbackRegistry::ScopedRegistrar save_registar; @@ -229,9 +231,27 @@ BOOL LLPanelOutfitEdit::postBuild()  	save_registar.add("Outfit.SaveAsNew.Action", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true));  	mSaveMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_save_outfit.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); +	mWearableListManager = new LLFilteredWearableListManager( +		getChild<LLInventoryItemsList>("filtered_wearables_list"), ALL_ITEMS_MASK); +		 +	childSetAction("move_closer_btn", boost::bind(&LLPanelOutfitEdit::moveWearable, this, true)); +	childSetAction("move_further_btn", boost::bind(&LLPanelOutfitEdit::moveWearable, this, false)); +  	return TRUE;  } +void LLPanelOutfitEdit::moveWearable(bool closer_to_body) +{ +	LLUUID item_id = mCOFWearables->getSelectedUUID(); +	if (item_id.isNull()) return; +	 +	LLViewerInventoryItem* wearable_to_move = gInventory.getItem(item_id); +	LLAppearanceMgr::getInstance()->moveWearable(wearable_to_move, closer_to_body); + +	//*TODO why not to listen to inventory? +	updateLookInfo(); +} +  void LLPanelOutfitEdit::showAddWearablesPanel()  {  	childSetVisible("add_wearables_panel", childGetValue("add_btn")); @@ -242,6 +262,11 @@ void LLPanelOutfitEdit::showWearablesFilter()  	childSetVisible("filter_combobox_panel", childGetValue("filter_button"));  } +void LLPanelOutfitEdit::showFilteredWearablesPanel() +{ +	childSetVisible("filtered_wearables_panel", !childIsVisible("filtered_wearables_panel")); +} +  void LLPanelOutfitEdit::saveOutfit(bool as_new)  {  	if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit()) @@ -256,6 +281,8 @@ void LLPanelOutfitEdit::saveOutfit(bool as_new)  	{  		panel_outfits_inventory->onSave();  	} + +	//*TODO how to get to know when base outfit is updated or new outfit is created?  }  void LLPanelOutfitEdit::showSaveMenu() @@ -275,6 +302,7 @@ void LLPanelOutfitEdit::onTypeFilterChanged(LLUICtrl* ctrl)  	{  		U32 curr_filter_type = type_filter->getCurrentIndex();  		mInventoryItemsPanel->setFilterTypes(mLookItemTypes[curr_filter_type].inventoryMask); +		mWearableListManager->setFilterMask(mLookItemTypes[curr_filter_type].inventoryMask);  	}  	mSavedFolderState->setApply(TRUE); @@ -346,7 +374,7 @@ void LLPanelOutfitEdit::onAddToOutfitClicked(void)  void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void)  { -	LLUUID id_to_remove = mLookContents->getSelectionInterface()->getCurrentID(); +	LLUUID id_to_remove = mCOFWearables->getSelectedUUID();  	LLAppearanceMgr::getInstance()->removeItemFromAvatar(id_to_remove); @@ -356,41 +384,9 @@ void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void)  } -void LLPanelOutfitEdit::onUpClicked(void) -{ -	LLUUID inv_id = mLookContents->getSelectionInterface()->getCurrentID(); -	if (inv_id.isNull()) -	{ -		//nothing selected, do nothing -		return; -	} - -	LLViewerInventoryItem *link_item = gInventory.getItem(inv_id); -	if (!link_item) -	{ -		llwarns << "could not find inventory item based on currently worn link." << llendl; -		return; -	} - - -	LLUUID asset_id = link_item->getAssetUUID(); -	if (asset_id.isNull()) -	{ -		llwarns << "inventory link has null Asset ID. could not get object reference" << llendl; -	} - -	static const std::string empty = ""; -	LLWearableList::instance().getAsset(asset_id, -										empty,	// don't care about wearable name -										link_item->getActualType(), -										LLSidepanelAppearance::editWearable, -										(void*)getParentUICtrl()); -} - -  void LLPanelOutfitEdit::onEditWearableClicked(void)  { -	LLUUID id_to_edit = mLookContents->getSelectionInterface()->getCurrentID(); +	LLUUID id_to_edit = mCOFWearables->getSelectedUUID();  	LLViewerInventoryItem * item_to_edit = gInventory.getItem(id_to_edit);  	if (item_to_edit) @@ -463,29 +459,11 @@ void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque<LLFolderView  void LLPanelOutfitEdit::onOutfitItemSelectionChange(void)  {	 -	LLScrollListItem* item = mLookContents->getLastSelectedItem(); -	if (!item) -		return; - -	LLRect item_rect; -	mLookContents->localRectToOtherView(item->getRect(), &item_rect, this); - -	// TODO button(and item list) should be removed (when new widget is ready) -	LLRect btn_rect = mEditWearableBtn->getRect(); -	btn_rect.set(item_rect.mRight - btn_rect.getWidth(), item_rect.mTop, item_rect.mRight, item_rect.mBottom); -	 -	mEditWearableBtn->setShape(btn_rect); -	sendChildToFront(mEditWearableBtn); -	 -	mEditWearableBtn->setEnabled(TRUE); -	if (!mEditWearableBtn->getVisible()) -	{ -		mEditWearableBtn->setVisible(TRUE); -	} +	LLUUID item_id = mCOFWearables->getSelectedUUID(); +	//*TODO show Edit Wearable Button -	const LLUUID& id_item_to_remove = item->getUUID(); -	LLViewerInventoryItem* item_to_remove = gInventory.getItem(id_item_to_remove); +	LLViewerInventoryItem* item_to_remove = gInventory.getItem(item_id);  	if (!item_to_remove) return;  	switch (item_to_remove->getType()) @@ -506,42 +484,15 @@ void LLPanelOutfitEdit::changed(U32 mask)  void LLPanelOutfitEdit::lookFetched(void)  { -	LLInventoryModel::cat_array_t cat_array; -	LLInventoryModel::item_array_t item_array; - -	// collectDescendentsIf takes non-const reference: -	LLFindCOFValidItems is_cof_valid; -	gInventory.collectDescendentsIf(mCurrentOutfitID, -									cat_array, -									item_array, -									LLInventoryModel::EXCLUDE_TRASH, -									is_cof_valid); -	for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin(); -		 iter != item_array.end(); -		 iter++) -	{ -		const LLViewerInventoryItem *item = (*iter); -		 -		LLSD row; -		row["id"] = item->getUUID(); -		LLSD& columns = row["columns"]; -		columns[0]["column"] = "look_item"; -		columns[0]["type"] = "text"; -		columns[0]["value"] = item->getName(); -		columns[1]["column"] = "look_item_sort"; -		columns[1]["type"] = "text"; // TODO: multi-wearable sort "type" should go here. -		columns[1]["value"] = "BAR"; // TODO: Multi-wearable sort index should go here -		 -		mLookContents->addElement(row); -	} +	mCOFWearables->refresh(); + +	updateVerbs();  }  void LLPanelOutfitEdit::updateLookInfo()  {	  	if (getVisible())  	{ -		mLookContents->clearRows(); -  		mFetchLook->setFetchID(mCurrentOutfitID);  		mFetchLook->startFetch();  		if (mFetchLook->isFinished()) @@ -577,4 +528,15 @@ void LLPanelOutfitEdit::displayCurrentOutfit()  	updateLookInfo();  } +//private +void LLPanelOutfitEdit::updateVerbs() +{ +	bool outfit_is_dirty = LLAppearanceMgr::getInstance()->isOutfitDirty(); +	 +	childSetEnabled(SAVE_BTN, outfit_is_dirty); +	childSetEnabled(REVERT_BTN, outfit_is_dirty); + +	mSaveMenu->setItemEnabled("save_outfit", outfit_is_dirty); +} +// EOF diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index 69e8016534..21fa849289 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -45,6 +45,7 @@  #include "llinventorymodel.h"  class LLButton; +class LLCOFWearables;  class LLTextBox;  class LLInventoryCategory;  class LLInventoryLookObserver; @@ -55,6 +56,7 @@ class LLScrollListCtrl;  class LLToggleableMenu;  class LLLookFetchObserver;  class LLFilterEditor; +class LLFilteredWearableListManager;  class LLPanelOutfitEdit : public LLPanel  { @@ -86,8 +88,11 @@ public:  		// Sends a request for data about the given parcel, which will  		// only update the location if there is none already available. +	void moveWearable(bool closer_to_body); +  	void showAddWearablesPanel();  	void showWearablesFilter(); +	void showFilteredWearablesPanel();  	void saveOutfit(bool as_new = false);  	void showSaveMenu(); @@ -98,7 +103,6 @@ public:  	void onOutfitItemSelectionChange(void);  	void onRemoveFromOutfitClicked(void);  	void onEditWearableClicked(void); -	void onUpClicked(void);  	void displayCurrentOutfit(); @@ -108,24 +112,28 @@ public:  private: +	void updateVerbs(); +  	//*TODO got rid of mCurrentOutfitID  	LLUUID				mCurrentOutfitID;  	LLTextBox*			mCurrentOutfitName; -	LLScrollListCtrl*	mLookContents;  	LLInventoryPanel*	mInventoryItemsPanel;  	LLFilterEditor*		mSearchFilter;  	LLSaveFolderState*	mSavedFolderState;  	std::string			mSearchString;  	LLButton*			mAddToOutfitBtn;  	LLButton*			mRemoveFromOutfitBtn; -	LLButton*			mUpBtn;  	LLButton*			mEditWearableBtn;  	LLToggleableMenu*	mSaveMenu; -	 + +	LLFilteredWearableListManager* mWearableListManager; +  	LLLookFetchObserver*		mFetchLook;  	LLInventoryLookObserver*	mLookObserver;  	std::vector<LLLookItemType> mLookItemTypes; + +	LLCOFWearables*		mCOFWearables;  };  #endif // LL_LLPANELOUTFITEDIT_H diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index b78268da7b..789e85b46f 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -49,6 +49,7 @@  #include "lllineeditor.h"  #include "llmodaldialog.h"  #include "llnotificationsutil.h" +#include "lloutfitslist.h"  #include "llsidepanelappearance.h"  #include "llsidetray.h"  #include "lltabcontainer.h" @@ -71,7 +72,8 @@ bool LLPanelOutfitsInventory::sShowDebugEditor = false;  LLPanelOutfitsInventory::LLPanelOutfitsInventory() : -	mActivePanel(NULL), +	mMyOutfitsPanel(NULL), +	mCurrentOutfitPanel(NULL),  	mParent(NULL)  {  	mSavedFolderState = new LLSaveFolderState(); @@ -145,9 +147,17 @@ void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent)  void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)  {  	mFilterSubString = string; + +	// TODO: add handling "My Outfits" tab. +	if (!isCOFPanelActive()) +	{ +		mMyOutfitsPanel->setFilterSubString(string); +		return; +	} +  	if (string == "")  	{ -		mActivePanel->setFilterSubString(LLStringUtil::null); +		getActivePanel()->setFilterSubString(LLStringUtil::null);  		// re-open folders that were initially open  		mSavedFolderState->setApply(TRUE); @@ -159,7 +169,7 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)  	LLInventoryModelBackgroundFetch::instance().start(); -	if (mActivePanel->getFilterSubString().empty() && string.empty()) +	if (getActivePanel()->getFilterSubString().empty() && string.empty())  	{  		// current filter and new filter empty, do nothing  		return; @@ -173,7 +183,7 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)  	}  	// set new filter string -	mActivePanel->setFilterSubString(string); +	getActivePanel()->setFilterSubString(string);  }  void LLPanelOutfitsInventory::onWearButtonClick() @@ -216,7 +226,7 @@ bool LLPanelOutfitsInventory::onSaveCommit(const LLSD& notification, const LLSD&  		LLStringUtil::trim(outfit_name);  		if( !outfit_name.empty() )  		{ -			LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name); +			LLUUID outfit_folder = LLAppearanceMgr::getInstance()->makeNewOutfitLinks(outfit_name);  			LLSidepanelAppearance* panel_appearance =  				dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); @@ -267,6 +277,11 @@ void LLPanelOutfitsInventory::onSave()  void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)  {  	updateVerbs(); + +	// TODO: add handling "My Outfits" tab. +	if (!isCOFPanelActive()) +		return; +  	if (getRootFolder()->needsAutoRename() && items.size())  	{  		getRootFolder()->startRenamingSelectedItem(); @@ -284,6 +299,10 @@ void LLPanelOutfitsInventory::showEditOutfitPanel()  LLFolderViewEventListener *LLPanelOutfitsInventory::getCorrectListenerForAction()  { +	// TODO: add handling "My Outfits" tab. +	if (!isCOFPanelActive()) +		return NULL; +  	LLFolderViewItem* current_item = getRootFolder()->getCurSelectedItem();  	if (!current_item)  		return NULL; @@ -311,7 +330,7 @@ bool LLPanelOutfitsInventory::getIsCorrectType(const LLFolderViewEventListener *  LLFolderView *LLPanelOutfitsInventory::getRootFolder()  { -	return mActivePanel->getRootFolder(); +	return getActivePanel()->getRootFolder();  }  //static @@ -393,7 +412,11 @@ void LLPanelOutfitsInventory::onTrashButtonClick()  void LLPanelOutfitsInventory::onClipboardAction(const LLSD& userdata)  {  	std::string command_name = userdata.asString(); -	getActivePanel()->getRootFolder()->doToSelected(getActivePanel()->getModel(),command_name); +	// TODO: add handling "My Outfits" tab. +	if (isCOFPanelActive()) +	{ +		getActivePanel()->getRootFolder()->doToSelected(getActivePanel()->getModel(),command_name); +	}  	updateListCommands();  	updateVerbs();  } @@ -447,21 +470,26 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)  	if (command_name == "delete" || command_name == "remove")  	{  		BOOL can_delete = FALSE; -		LLFolderView* root = getActivePanel()->getRootFolder(); -		if (root) + +		// TODO: add handling "My Outfits" tab. +		if (isCOFPanelActive())  		{ -			std::set<LLUUID> selection_set; -			root->getSelectionList(selection_set); -			can_delete = (selection_set.size() > 0); -			for (std::set<LLUUID>::iterator iter = selection_set.begin(); -				 iter != selection_set.end(); -				 ++iter) +			LLFolderView* root = getActivePanel()->getRootFolder(); +			if (root)  			{ -				const LLUUID &item_id = (*iter); -				LLFolderViewItem *item = root->getItemByID(item_id); -				can_delete &= item->getListener()->isItemRemovable(); +				std::set<LLUUID> selection_set; +				root->getSelectionList(selection_set); +				can_delete = (selection_set.size() > 0); +				for (std::set<LLUUID>::iterator iter = selection_set.begin(); +					 iter != selection_set.end(); +					 ++iter) +				{ +					const LLUUID &item_id = (*iter); +					LLFolderViewItem *item = root->getItemByID(item_id); +					can_delete &= item->getListener()->isItemRemovable(); +				} +				return can_delete;  			} -			return can_delete;  		}  		return FALSE;  	} @@ -517,12 +545,17 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)  bool LLPanelOutfitsInventory::hasItemsSelected()  {  	bool has_items_selected = false; -	LLFolderView* root = getActivePanel()->getRootFolder(); -	if (root) + +	// TODO: add handling "My Outfits" tab. +	if (isCOFPanelActive())  	{ -		std::set<LLUUID> selection_set; -		root->getSelectionList(selection_set); -		has_items_selected = (selection_set.size() > 0); +		LLFolderView* root = getActivePanel()->getRootFolder(); +		if (root) +		{ +			std::set<LLUUID> selection_set; +			root->getSelectionList(selection_set); +			has_items_selected = (selection_set.size() > 0); +		}  	}  	return has_items_selected;  } @@ -549,74 +582,58 @@ bool LLPanelOutfitsInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropTy  void LLPanelOutfitsInventory::initTabPanels()  { -	LLInventoryPanel *cof_panel = getChild<LLInventoryPanel>(COF_TAB_NAME); -	cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); -	mTabPanels.push_back(cof_panel); +	mCurrentOutfitPanel = getChild<LLInventoryPanel>(COF_TAB_NAME); +	mCurrentOutfitPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); +	mCurrentOutfitPanel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onTabSelectionChange, this, mCurrentOutfitPanel, _1, _2)); -	LLInventoryPanel *myoutfits_panel = getChild<LLInventoryPanel>(OUTFITS_TAB_NAME); -	myoutfits_panel->setFilterTypes(1LL << LLFolderType::FT_OUTFIT, LLInventoryFilter::FILTERTYPE_CATEGORY); -	myoutfits_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); -	mTabPanels.push_back(myoutfits_panel); -	 -	for (tabpanels_vec_t::iterator iter = mTabPanels.begin(); -		 iter != mTabPanels.end(); -		 ++iter) -	{ -		LLInventoryPanel *panel = (*iter); -		panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onTabSelectionChange, this, panel, _1, _2)); -	} +	mMyOutfitsPanel = getChild<LLOutfitsList>(OUTFITS_TAB_NAME);  	mAppearanceTabs = getChild<LLTabContainer>("appearance_tabs");  	mAppearanceTabs->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::onTabChange, this)); -	mActivePanel = (LLInventoryPanel*)mAppearanceTabs->getCurrentPanel();  }  void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action)  {  	if (user_action && items.size() > 0)  	{ -		for (tabpanels_vec_t::iterator iter = mTabPanels.begin(); -			 iter != mTabPanels.end(); -			 ++iter) +		// TODO: add handling "My Outfits" tab. +		if (isCOFPanelActive())  		{ -			LLInventoryPanel *panel = (*iter); -			if (panel == tab_panel) -			{ -				mActivePanel = panel; -			} -			else -			{ -				panel->getRootFolder()->clearSelection(); -			} +			onSelectionChange(items, user_action); +		} +		else +		{ +			mCurrentOutfitPanel->getRootFolder()->clearSelection();  		}  	} -	onSelectionChange(items, user_action);  }  void LLPanelOutfitsInventory::onTabChange()  { -	mActivePanel = (LLInventoryPanel*)childGetVisibleTab("appearance_tabs"); -	if (!mActivePanel) +	// TODO: add handling "My Outfits" tab. +	if (isCOFPanelActive())  	{ -		return; +		mCurrentOutfitPanel->setFilterSubString(mFilterSubString); +	} +	else +	{ +		mMyOutfitsPanel->setFilterSubString(mFilterSubString);  	} -	mActivePanel->setFilterSubString(mFilterSubString); +  	updateVerbs();  }  BOOL LLPanelOutfitsInventory::isTabPanel(LLInventoryPanel *panel) const  { -	for(tabpanels_vec_t::const_iterator it = mTabPanels.begin(); -		it != mTabPanels.end(); -		++it) +	// TODO: add handling "My Outfits" tab. +	if (mCurrentOutfitPanel == panel)  	{ -		if (*it == panel) -			return TRUE; +		return TRUE;  	}  	return FALSE;  }  BOOL LLPanelOutfitsInventory::isCOFPanelActive() const  { -	return (getActivePanel()->getName() == COF_TAB_NAME); +	return (childGetVisibleTab("appearance_tabs")->getName() == COF_TAB_NAME);  } diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 5d0d27ee4f..4234cc45c5 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -40,6 +40,7 @@ class LLFolderView;  class LLFolderViewItem;  class LLFolderViewEventListener;  class LLInventoryPanel; +class LLOutfitsList;  class LLSaveFolderState;  class LLButton;  class LLMenuGL; @@ -88,20 +89,21 @@ private:  public:  	//////////////////////////////////////////////////////////////////////////////////  	// tab panels -	LLInventoryPanel* 		getActivePanel() { return mActivePanel; } -	const LLInventoryPanel* getActivePanel() const { return mActivePanel; } +	// TODO: change getActivePanel() to return the active tab instead of returning +	// a pointer to "Wearing" inventory panel. +	LLInventoryPanel* 		getActivePanel() { return mCurrentOutfitPanel; } +  	BOOL 					isTabPanel(LLInventoryPanel *panel) const; -	 +	BOOL 					isCOFPanelActive() const; +  protected:  	void 					initTabPanels();  	void 					onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action);  	void 					onTabChange(); -	BOOL 					isCOFPanelActive() const;  private: -	LLInventoryPanel* 		mActivePanel; -	typedef std::vector<LLInventoryPanel *> tabpanels_vec_t; -	tabpanels_vec_t 		mTabPanels; +	LLOutfitsList*			mMyOutfitsPanel; +	LLInventoryPanel*		mCurrentOutfitPanel;  	// tab panels                                                               //  	//////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index daa2a04f65..f2c0f92f9b 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -443,6 +443,7 @@ public:  LLPanelPeople::LLPanelPeople()  	:	LLPanel(),  		mFilterSubString(LLStringUtil::null), +		mFilterSubStringOrig(LLStringUtil::null),  		mFilterEditor(NULL),  		mTabContainer(NULL),  		mOnlineFriendList(NULL), @@ -645,6 +646,25 @@ void LLPanelPeople::onChange(EStatusType status, const std::string &channelURI,  	updateButtons();  } +void LLPanelPeople::updateFriendListHelpText() +{ +	// show special help text for just created account to help finding friends. EXT-4836 +	static LLTextBox* no_friends_text = getChild<LLTextBox>("no_friends_help_text"); + +	// Seems sometimes all_friends can be empty because of issue with Inventory loading (clear cache, slow connection...) +	// So, lets check all lists to avoid overlapping the text with online list. See EXT-6448. +	bool any_friend_exists = mAllFriendList->filterHasMatches() || mOnlineFriendList->filterHasMatches(); +	no_friends_text->setVisible(!any_friend_exists); +	if (no_friends_text->getVisible()) +	{ +		//update help text for empty lists +		std::string message_name = mFilterSubString.empty() ? "no_friends_msg" : "no_filtered_friends_msg"; +		LLStringUtil::format_map_t args; +		args["[SEARCH_TERM]"] = LLURI::escape(mFilterSubStringOrig); +		no_friends_text->setText(getString(message_name, args)); +	} +} +  void LLPanelPeople::updateFriendList()  {  	if (!mOnlineFriendList || !mAllFriendList) @@ -684,14 +704,6 @@ void LLPanelPeople::updateFriendList()  			online_friendsp.push_back(buddy_id);  	} -	// show special help text for just created account to help found friends. EXT-4836 -	static LLTextBox* no_friends_text = getChild<LLTextBox>("no_friends_msg"); - -	// Seems sometimes all_friends can be empty because of issue with Inventory loading (clear cache, slow connection...) -	// So, lets check all lists to avoid overlapping the text with online list. See EXT-6448. -	bool any_friend_exists = (all_friendsp.size() > 0) || (online_friendsp.size() > 0); -	no_friends_text->setVisible(!any_friend_exists); -  	/*  	 * Avatarlists  will be hidden by showFriendsAccordionsIfNeeded(), if they do not have items.  	 * But avatarlist can be updated only if it is visible @see LLAvatarList::draw();    @@ -972,10 +984,11 @@ bool LLPanelPeople::isRealGroup()  void LLPanelPeople::onFilterEdit(const std::string& search_string)  { -	std::string search_upper = search_string; +	mFilterSubStringOrig = search_string; +	LLStringUtil::trimHead(mFilterSubStringOrig);  	// Searches are case-insensitive +	std::string search_upper = mFilterSubStringOrig;  	LLStringUtil::toUpper(search_upper); -	LLStringUtil::trimHead(search_upper);  	if (mFilterSubString == search_upper)  		return; @@ -990,11 +1003,11 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string)  	// Apply new filter. -	mNearbyList->setNameFilter(mFilterSubString); -	mOnlineFriendList->setNameFilter(mFilterSubString); -	mAllFriendList->setNameFilter(mFilterSubString); -	mRecentList->setNameFilter(mFilterSubString); -	mGroupList->setNameFilter(mFilterSubString); +	mNearbyList->setNameFilter(mFilterSubStringOrig); +	mOnlineFriendList->setNameFilter(mFilterSubStringOrig); +	mAllFriendList->setNameFilter(mFilterSubStringOrig); +	mRecentList->setNameFilter(mFilterSubStringOrig); +	mGroupList->setNameFilter(mFilterSubStringOrig);  	setAccordionCollapsedByUser("tab_online", false);  	setAccordionCollapsedByUser("tab_all", false); @@ -1436,6 +1449,9 @@ void LLPanelPeople::showFriendsAccordionsIfNeeded()  		// Rearrange accordions  		LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("friends_accordion");  		accordion->arrange(); + +		// keep help text in a synchronization with accordions visibility. +		updateFriendListHelpText();  	}  } diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 891381e2de..17c45a034b 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -73,6 +73,7 @@ private:  	} ESortOrder;  	// methods indirectly called by the updaters +	void					updateFriendListHelpText();  	void					updateFriendList();  	void					updateNearbyList();  	void					updateRecentList(); @@ -168,6 +169,7 @@ private:  	Updater*				mRecentListUpdater;  	std::string				mFilterSubString; +	std::string				mFilterSubStringOrig;  };  #endif //LL_LLPANELPEOPLE_H diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 17784c31e3..51a11e97e4 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -528,8 +528,7 @@ void LLPanelPlaces::onFilterEdit(const std::string& search_string, bool force_fi  		std::string string = search_string;  		// Searches are case-insensitive -		LLStringUtil::toUpper(string); -		LLStringUtil::trimHead(string); +		// but we don't convert the typed string to upper-case so that it can be fed to the web search as-is.  		mActivePanel->onSearchEdit(string);  	} @@ -1071,8 +1070,7 @@ void LLPanelPlaces::updateVerbs()  	mSaveBtn->setVisible(isLandmarkEditModeOn);  	mCancelBtn->setVisible(isLandmarkEditModeOn);  	mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn); -	mPlaceInfoBtn->setVisible(mPlaceInfoType != LANDMARK_INFO_TYPE && mPlaceInfoType != TELEPORT_HISTORY_INFO_TYPE -			&& !is_create_landmark_visible && !isLandmarkEditModeOn); +	mPlaceInfoBtn->setVisible(!is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn);  	mShowOnMapBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos);  	mPlaceInfoBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos); diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 00afb00ddc..11b6c0a3ae 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -2,25 +2,31 @@   * @file llscriptfloater.cpp   * @brief LLScriptFloater class definition   * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + *  + * Copyright (c) 2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ @@ -170,15 +176,7 @@ void LLScriptFloater::onClose(bool app_quitting)  	if(getNotificationId().notNull())  	{ -		// we shouldn't kill notification on exit since it may be used as persistent. -		if (app_quitting) -		{ -			LLScriptFloaterManager::getInstance()->onRemoveNotification(getNotificationId()); -		} -		else -		{ -			LLScriptFloaterManager::getInstance()->removeNotification(getNotificationId()); -		} +		LLScriptFloaterManager::getInstance()->onRemoveNotification(getNotificationId());  	}  } @@ -354,7 +352,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)  				set_new_message |= !floater->hasFocus();  			} -			removeNotification(it->first); +			onRemoveNotification(it->first);  		}  	} @@ -381,17 +379,6 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)  	toggleScriptFloater(notification_id, set_new_message);  } -void LLScriptFloaterManager::removeNotification(const LLUUID& notification_id) -{ -	LLNotificationPtr notification = LLNotifications::instance().find(notification_id); -	if (notification != NULL && !notification->isCancelled()) -	{ -		LLNotificationsUtil::cancel(notification); -	} - -	onRemoveNotification(notification_id); -} -  void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id)  {  	if(notification_id.isNull()) @@ -405,8 +392,6 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id)  	LLIMWellWindow::getInstance()->removeObjectRow(notification_id); -	mNotifications.erase(notification_id); -  	// close floater  	LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", notification_id);  	if(floater) @@ -415,6 +400,8 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id)  		floater->setNotificationId(LLUUID::null);  		floater->closeFloater();  	} + +	mNotifications.erase(notification_id);  }  void LLScriptFloaterManager::toggleScriptFloater(const LLUUID& notification_id, bool set_new_message) @@ -495,7 +482,7 @@ std::string LLScriptFloaterManager::getObjectName(const LLUUID& notification_id)  		text = notification->getSubstitutions()["OBJECTNAME"].asString();  		break;  	case LLScriptFloaterManager::OBJ_GIVE_INVENTORY: -		text = notification->getSubstitutions()["OBJECTFROMNAME"].asString(); +		text = notification->getSubstitutions()["NAME"].asString();  		break;  	default:  		text = LLTrans::getString("object"); diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index da70bb4334..dc0cfc2400 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -2,25 +2,31 @@   * @file llscriptfloater.h   * @brief LLScriptFloater class definition   * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + *  + * Copyright (c) 2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ @@ -59,11 +65,6 @@ public:  	void onAddNotification(const LLUUID& notification_id);  	/** -	 * Removes notification. -	 */ -	void removeNotification(const LLUUID& notification_id); - -	/**  	 * Handles notification removal.  	 * Removes script notification toast, removes script chiclet, closes script floater  	 */ diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index abef47d4be..f38df19de0 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -197,8 +197,7 @@ void LLSidepanelAppearance::onFilterEdit(const std::string& search_string)  		mFilterSubString = search_string;  		// Searches are case-insensitive -		LLStringUtil::toUpper(mFilterSubString); -		LLStringUtil::trimHead(mFilterSubString); +		// but we don't convert the typed string to upper-case so that it can be fed to the web search as-is.  		mPanelOutfitsInventory->onSearchEdit(mFilterSubString);  	} @@ -329,8 +328,8 @@ void LLSidepanelAppearance::updateVerbs()  	if (mPanelOutfitsInventory && !is_look_info_visible)  	{ -		const bool is_correct_type = (mPanelOutfitsInventory->getCorrectListenerForAction() != NULL); -		mEditBtn->setEnabled(is_correct_type); +//		const bool is_correct_type = (mPanelOutfitsInventory->getCorrectListenerForAction() != NULL); +//		mEditBtn->setEnabled(is_correct_type);  	}  	else  	{ diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp index 0d8b45db1f..15684337f4 100644 --- a/indra/newview/llteleporthistory.cpp +++ b/indra/newview/llteleporthistory.cpp @@ -2,25 +2,31 @@   * @file llteleporthistory.cpp   * @brief Teleport history   * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + *  + * Copyright (c) 2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ @@ -32,7 +38,6 @@  #include "llsdserialize.h"  #include "llagent.h" -#include "llvoavatarself.h"  #include "llslurl.h"  #include "llviewercontrol.h"        // for gSavedSettings  #include "llviewerparcelmgr.h" @@ -103,16 +108,6 @@ void LLTeleportHistory::onTeleportFailed()  	}  } -void LLTeleportHistory::handleLoginComplete() -{ -	if( mGotInitialUpdate ) -	{ -		return; -	} -	updateCurrentLocation(gAgent.getPositionGlobal()); -} - -  void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)  {  	if (mRequestedItem != -1) // teleport within the history in progress? @@ -122,17 +117,6 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)  	}  	else  	{ -		//EXT-7034 -		//skip initial update if agent avatar is no valid yet -		//this may happen when updateCurrentLocation called while login process -		//sometimes isAgentAvatarValid return false and in this case new_pos -		//(which actually is gAgent.getPositionGlobal() ) is invalid -		//if this position will be saved then teleport back will teleport user to wrong position -		if ( !mGotInitialUpdate && !isAgentAvatarValid() ) -		{ -			return ; -		} -  		// If we're getting the initial location update  		// while we already have a (loaded) non-empty history,  		// there's no need to purge forward items or add a new item. diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp index 0ba455e7d5..430d62e15e 100644 --- a/indra/newview/llteleporthistorystorage.cpp +++ b/indra/newview/llteleporthistorystorage.cpp @@ -2,25 +2,31 @@   * @file llteleporthistorystorage.cpp   * @brief Teleport history   * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + *   * 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 + * 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$   */ diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 2ea6e5936d..e64696b120 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -850,6 +850,7 @@ bool LLTextureFetchWorker::doWork(S32 param)  				mState = WAIT_HTTP_REQ;	  				mFetcher->addToHTTPQueue(mID); +				mSentRequest = QUEUED;  				// Will call callbackHttpGet when curl request completes  				std::vector<std::string> headers;  				headers.push_back("Accept: image/x-j2c"); @@ -936,6 +937,11 @@ bool LLTextureFetchWorker::doWork(S32 param)  			{  				mFileSize = mBufferSize;  			} +			else //the file size is unknown +			{ +				mFileSize = S32_MAX ; //flag the file is not fully loaded. +			} +  			U8* buffer = new U8[mBufferSize];  			if (cur_size > 0)  			{ diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 22b12ee132..568cd4cb19 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -67,6 +67,7 @@ LLToast::Params::Params()  LLToast::LLToast(const LLToast::Params& p)   :	LLModalDialog(LLSD(), p.is_modal),  	mPanel(p.panel),  +	mToastLifetime(p.lifetime_secs),  	mToastFadingTime(p.fading_time_secs),  	mNotificationID(p.notif_id),    	mSessionID(p.session_id), @@ -241,6 +242,13 @@ void LLToast::draw()  			drawChild(mHideBtn);  		}  	} + +	// if timer started and remaining time <= fading time +	if (mTimer->getStarted() && (mToastLifetime +			- mTimer->getEventTimer().getElapsedTimeF32()) <= mToastFadingTime) +	{ +		setBackgroundOpaque(FALSE); +	}  }  //-------------------------------------------------------------------------- diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 4a213580da..4211f21ef1 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -209,6 +209,7 @@ private:  	// timer counts a lifetime of a toast  	std::auto_ptr<LLToastLifeTimer> mTimer; +	F32			mToastLifetime; // in seconds  	F32			mToastFadingTime; // in seconds  	LLPanel*		mPanel; diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 986ccdf19b..2b529a4e50 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -50,6 +50,7 @@  #include "llnotifications.h"  #include "llfunctorregistry.h"  #include "llrootview.h" +#include "llviewercontrol.h" // for gSavedSettings  const S32 MAX_ALLOWED_MSG_WIDTH = 400;  const F32 DEFAULT_BUTTON_DELAY = 0.5f; @@ -279,7 +280,18 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal  			mLineEditor->reshape(leditor_rect.getWidth(), leditor_rect.getHeight());  			mLineEditor->setRect(leditor_rect);  			mLineEditor->setText(edit_text_contents); -			mLineEditor->setMaxTextLength(STD_STRING_STR_LEN - 1); + +			// decrease limit of line editor of teleport offer dialog to avoid truncation of +			// location URL in invitation message, see EXT-6891 +			if ("OfferTeleport" == mNotification->getName()) +			{ +				mLineEditor->setMaxTextLength(gSavedSettings.getS32( +						"teleport_offer_invitation_max_length")); +			} +			else +			{ +				mLineEditor->setMaxTextLength(STD_STRING_STR_LEN - 1); +			}  			LLToastPanel::addChild(mLineEditor); diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index c9d2d404c0..089163929e 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -493,7 +493,7 @@ void LLToastNotifyPanel::onClickButton(void* data)  	{  		sButtonClickSignal(self->mNotification->getID(), button_name); -		if(new_info) +		if(new_info && !self->mNotification->isPersistent())  		{  			self->mNotification->setResponseFunctor(  				boost::bind(&LLOfferInfo::inventory_offer_callback, new_info, _1, _2)); diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index d142a0665b..71598b3169 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -33,6 +33,7 @@  #include "llviewerprecompiledheaders.h"  #include "llpanelgenerictip.h" +#include "llpanelonlinestatus.h"  #include "llnotifications.h"  #include "lltoastpanel.h" @@ -97,9 +98,19 @@ LLToastPanel* LLToastPanel::buidPanelFromNotification(  {  	LLToastPanel* res = NULL; -	if (notification->getName() == "SystemMessageTip") +	//process tip toast panels +	if ("notifytip" == notification->getType())  	{ -		res = new LLPanelGenericTip(notification); +		// if it is online/offline notification +		if ("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName()) +		{ +			res = new LLPanelOnlineStatus(notification); +		} +		// in all other case we use generic tip panel +		else +		{ +			res = new LLPanelGenericTip(notification); +		}  	}  	/*  	 else if(...) diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index 2661c9f32b..9559311e3c 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -145,7 +145,7 @@ void audio_update_volume(bool force_update)  	{		  		F32 music_volume = gSavedSettings.getF32("AudioLevelMusic");  		BOOL music_muted = gSavedSettings.getBOOL("MuteMusic"); -		music_volume = mute_volume * master_volume * (music_volume*music_volume); +		music_volume = mute_volume * master_volume * music_volume;  		gAudiop->setInternetStreamGain ( music_muted ? 0.f : music_volume );  	} @@ -153,7 +153,7 @@ void audio_update_volume(bool force_update)  	// Streaming Media  	F32 media_volume = gSavedSettings.getF32("AudioLevelMedia");  	BOOL media_muted = gSavedSettings.getBOOL("MuteMedia"); -	media_volume = mute_volume * master_volume * (media_volume*media_volume); +	media_volume = mute_volume * master_volume * media_volume;  	LLViewerMedia::setVolume( media_muted ? 0.0f : media_volume );  	// Voice diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 8a891b1462..b39ee8b2e0 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -67,6 +67,40 @@  #include "llviewermessage.h"  ///---------------------------------------------------------------------------- +/// Helper class to store special inventory item names  +///---------------------------------------------------------------------------- +class LLLocalizedInventoryItemsDictionary : public LLSingleton<LLLocalizedInventoryItemsDictionary> +{ +public: +	std::map<std::string, std::string> mInventoryItemsDict; + +	LLLocalizedInventoryItemsDictionary() +	{ +		mInventoryItemsDict["New Shape"]		= LLTrans::getString("New Shape"); +		mInventoryItemsDict["New Skin"]			= LLTrans::getString("New Skin"); +		mInventoryItemsDict["New Hair"]			= LLTrans::getString("New Hair"); +		mInventoryItemsDict["New Eyes"]			= LLTrans::getString("New Eyes"); +		mInventoryItemsDict["New Shirt"]		= LLTrans::getString("New Shirt"); +		mInventoryItemsDict["New Pants"]		= LLTrans::getString("New Pants"); +		mInventoryItemsDict["New Shoes"]		= LLTrans::getString("New Shoes"); +		mInventoryItemsDict["New Socks"]		= LLTrans::getString("New Socks"); +		mInventoryItemsDict["New Jacket"]		= LLTrans::getString("New Jacket"); +		mInventoryItemsDict["New Gloves"]		= LLTrans::getString("New Gloves"); +		mInventoryItemsDict["New Undershirt"]	= LLTrans::getString("New Undershirt"); +		mInventoryItemsDict["New Underpants"]	= LLTrans::getString("New Underpants"); +		mInventoryItemsDict["New Skirt"]		= LLTrans::getString("New Skirt"); +		mInventoryItemsDict["New Alpha"]		= LLTrans::getString("New Alpha"); +		mInventoryItemsDict["New Tattoo"]		= LLTrans::getString("New Tattoo"); +		mInventoryItemsDict["Invalid Wearable"] = LLTrans::getString("Invalid Wearable"); + +		mInventoryItemsDict["New Script"]		= LLTrans::getString("New Script"); +		mInventoryItemsDict["New Folder"]		= LLTrans::getString("New Folder"); +		mInventoryItemsDict["Contents"]			= LLTrans::getString("Contents"); +	} +}; + + +///----------------------------------------------------------------------------  /// Local function declarations, constants, enums, and typedefs  ///---------------------------------------------------------------------------- @@ -316,6 +350,18 @@ BOOL LLViewerInventoryItem::unpackMessage(LLSD item)  BOOL LLViewerInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num)  {  	BOOL rv = LLInventoryItem::unpackMessage(msg, block, block_num); + +	std::string localized_str; + +	std::map<std::string, std::string>::const_iterator dictionary_iter; + +	dictionary_iter = LLLocalizedInventoryItemsDictionary::getInstance()->mInventoryItemsDict.find(mName); + +	if(dictionary_iter != LLLocalizedInventoryItemsDictionary::getInstance()->mInventoryItemsDict.end()) +	{ +		mName = dictionary_iter->second; +	} +  	mIsComplete = TRUE;  	return rv;  } @@ -867,6 +913,25 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,  						   U32 next_owner_perm,  						   LLPointer<LLInventoryCallback> cb)  { +	//check if name is equal to one of special inventory items names +	//EXT-5839 +	std::string server_name = name; + +	{ +		std::map<std::string, std::string>::const_iterator dictionary_iter; + +		for (dictionary_iter = LLLocalizedInventoryItemsDictionary::getInstance()->mInventoryItemsDict.begin(); +			 dictionary_iter != LLLocalizedInventoryItemsDictionary::getInstance()->mInventoryItemsDict.end(); +			 dictionary_iter++) +		{ +			const std::string& localized_name = dictionary_iter->second; +			if(localized_name == name) +			{ +				server_name = dictionary_iter->first; +			} +		} +	} +  	LLMessageSystem* msg = gMessageSystem;  	msg->newMessageFast(_PREHASH_CreateInventoryItem);  	msg->nextBlock(_PREHASH_AgentData); @@ -880,7 +945,7 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,  	msg->addS8Fast(_PREHASH_Type, (S8)asset_type);  	msg->addS8Fast(_PREHASH_InvType, (S8)inv_type);  	msg->addU8Fast(_PREHASH_WearableType, (U8)wtype); -	msg->addStringFast(_PREHASH_Name, name); +	msg->addStringFast(_PREHASH_Name, server_name);  	msg->addStringFast(_PREHASH_Description, desc);  	gAgent.sendReliableMessage(); @@ -923,6 +988,7 @@ void link_inventory_item(  	const LLUUID& item_id,  	const LLUUID& parent_id,  	const std::string& new_name, +	const std::string& new_description,  	const LLAssetType::EType asset_type,  	LLPointer<LLInventoryCallback> cb)  { @@ -948,7 +1014,6 @@ void link_inventory_item(  	}  	LLUUID transaction_id; -	std::string desc = "Broken link"; // This should only show if the object can't find its baseobj.  	LLInventoryType::EType inv_type = LLInventoryType::IT_NONE;  	if (dynamic_cast<const LLInventoryCategory *>(baseobj))  	{ @@ -979,7 +1044,7 @@ void link_inventory_item(  		msg->addS8Fast(_PREHASH_Type, (S8)asset_type);  		msg->addS8Fast(_PREHASH_InvType, (S8)inv_type);  		msg->addStringFast(_PREHASH_Name, new_name); -		msg->addStringFast(_PREHASH_Description, desc); +		msg->addStringFast(_PREHASH_Description, new_description);  	}  	gAgent.sendReliableMessage();  } diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 9d449399e8..f296ce35ff 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -339,6 +339,7 @@ void link_inventory_item(  	const LLUUID& item_id,  	const LLUUID& parent_id,  	const std::string& new_name, +	const std::string& new_description,  	const LLAssetType::EType asset_type,  	LLPointer<LLInventoryCallback> cb); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index bc4e20d706..78be6bdfd0 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1035,21 +1035,26 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)  			{  				// Use the name of the last item giver, who is probably the person  				// spamming you. -				std::ostringstream message; -				message << LLAppViewer::instance()->getSecondLifeTitle(); + +				LLStringUtil::format_map_t arg; +				std::string log_msg; +				std::ostringstream time ; +				time<<OFFER_THROTTLE_TIME; + +				arg["APP_NAME"] = LLAppViewer::instance()->getSecondLifeTitle(); +				arg["TIME"] = time.str(); +  				if (!from_name.empty())  				{ -					message << ": Items coming in too fast from " << from_name; +					arg["FROM_NAME"] = from_name; +					log_msg = LLTrans::getString("ItemsComingInTooFastFrom", arg);  				}  				else  				{ -					message << ": Items coming in too fast"; +					log_msg = LLTrans::getString("ItemsComingInTooFast", arg);  				} -				message << ", automatic preview disabled for " -					<< OFFER_THROTTLE_TIME << " seconds.";  				//this is kinda important, so actually put it on screen -				std::string log_msg = message.str();  				LLSD args;  				args["MESSAGE"] = log_msg;  				LLNotificationsUtil::add("SystemMessage", args); @@ -1247,6 +1252,16 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,  			gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(blocked_id));  } +LLOfferInfo::LLOfferInfo() + : LLNotificationResponderInterface() + , mFromGroup(FALSE) + , mFromObject(FALSE) + , mIM(IM_NOTHING_SPECIAL) + , mType(LLAssetType::AT_NONE) + , mPersist(false) +{ +} +  LLOfferInfo::LLOfferInfo(const LLSD& sd)  {  	mIM = (EInstantMessage)sd["im_type"].asInteger(); @@ -1260,6 +1275,7 @@ LLOfferInfo::LLOfferInfo(const LLSD& sd)  	mFromName = sd["from_name"].asString();  	mDesc = sd["description"].asString();  	mHost = LLHost(sd["sender"].asString()); +	mPersist = sd["persist"].asBoolean();  }  LLOfferInfo::LLOfferInfo(const LLOfferInfo& info) @@ -1275,6 +1291,7 @@ LLOfferInfo::LLOfferInfo(const LLOfferInfo& info)  	mFromName = info.mFromName;  	mDesc = info.mDesc;  	mHost = info.mHost; +	mPersist = info.mPersist;  }  LLSD LLOfferInfo::asLLSD() @@ -1291,9 +1308,15 @@ LLSD LLOfferInfo::asLLSD()  	sd["from_name"] = mFromName;  	sd["description"] = mDesc;  	sd["sender"] = mHost.getIPandPort(); +	sd["persist"] = mPersist;  	return sd;  } +void LLOfferInfo::fromLLSD(const LLSD& params) +{ +	*this = params; +} +  void LLOfferInfo::send_auto_receive_response(void)  {	  	LLMessageSystem* msg = gMessageSystem; @@ -1333,6 +1356,21 @@ void LLOfferInfo::send_auto_receive_response(void)  	}  } +void LLOfferInfo::handleRespond(const LLSD& notification, const LLSD& response) +{ +	initRespondFunctionMap(); + +	const std::string name = notification["name"].asString(); +	if(mRespondFunctions.find(name) == mRespondFunctions.end()) +	{ +		llwarns << "Unexpected notification name : " << name << llendl; +		llassert(!"Unexpected notification name"); +		return; +	} + +	mRespondFunctions[name](notification, response); +} +  bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& response)  {  	LLChat chat; @@ -1469,7 +1507,10 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&  		gInventory.addObserver(opener);  	} -	delete this; +	if(!mPersist) +	{ +		delete this; +	}  	return false;  } @@ -1635,7 +1676,10 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const  		gInventory.addObserver(opener);  	} -	delete this; +	if(!mPersist) +	{ +		delete this; +	}  	return false;  } @@ -1651,6 +1695,16 @@ protected:  	}  }; +void LLOfferInfo::initRespondFunctionMap() +{ +	if(mRespondFunctions.empty()) +	{ +		mRespondFunctions["ObjectGiveItem"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2); +		mRespondFunctions["ObjectGiveItemUnknownUser"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2); +		mRespondFunctions["UserGiveItem"] = boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2); +	} +} +  void inventory_offer_handler(LLOfferInfo* info)  {  	//Until throttling is implmented, busy mode should reject inventory instead of silently @@ -1767,7 +1821,8 @@ void inventory_offer_handler(LLOfferInfo* info)  		// Inventory Slurls don't currently work for non agent transfers, so only display the object name.  		args["ITEM_SLURL"] = msg;  		// Note: sets inventory_task_offer_callback as the callback -		p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_task_offer_callback, info, _1, _2)); +		p.substitutions(args).payload(payload).functor.responder(LLNotificationResponderPtr(info)); +		info->mPersist = true;  		p.name = name_found ? "ObjectGiveItem" : "ObjectGiveItemUnknownUser";  		// Pop up inv offer chiclet and let the user accept (keep), or reject (and silently delete) the inventory.  		LLNotifications::instance().add(p); @@ -1779,7 +1834,8 @@ void inventory_offer_handler(LLOfferInfo* info)  		// *TODO fix memory leak  		// inventory_offer_callback() is not invoked if user received notification and   		// closes viewer(without responding the notification) -		p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, info, _1, _2)); +		p.substitutions(args).payload(payload).functor.responder(LLNotificationResponderPtr(info)); +		info->mPersist = true;  		p.name = "UserGiveItem";  		// Prefetch the item into your local inventory. @@ -1800,10 +1856,8 @@ void inventory_offer_handler(LLOfferInfo* info)  		// Inform user that there is a script floater via toast system  		{  			payload["give_inventory_notification"] = TRUE; -		    LLNotification::Params params(p.name); -		    params.substitutions = p.substitutions; -		    params.payload = payload; -		    LLPostponedNotification::add<LLPostponedOfferNotification>(	params, info->mFromID, false); +		    p.payload = payload; +		    LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, false);  		}  	}  } @@ -1880,7 +1934,7 @@ protected:  	}  }; -static void parse_lure_bucket(const std::string& bucket, +static bool parse_lure_bucket(const std::string& bucket,  							  U64& region_handle,  							  LLVector3& pos,  							  LLVector3& look_at, @@ -1892,15 +1946,25 @@ static void parse_lure_bucket(const std::string& bucket,  	tokenizer tokens(bucket, sep);  	tokenizer::iterator iter = tokens.begin(); -	S32 gx = boost::lexical_cast<S32>((*(iter)).c_str()); -	S32 gy = boost::lexical_cast<S32>((*(++iter)).c_str()); -	S32 rx = boost::lexical_cast<S32>((*(++iter)).c_str()); -	S32 ry = boost::lexical_cast<S32>((*(++iter)).c_str()); -	S32 rz = boost::lexical_cast<S32>((*(++iter)).c_str()); -	S32 lx = boost::lexical_cast<S32>((*(++iter)).c_str()); -	S32 ly = boost::lexical_cast<S32>((*(++iter)).c_str()); -	S32 lz = boost::lexical_cast<S32>((*(++iter)).c_str()); - +	S32 gx,gy,rx,ry,rz,lx,ly,lz; +	try +	{ +		gx = boost::lexical_cast<S32>((*(iter)).c_str()); +		gy = boost::lexical_cast<S32>((*(++iter)).c_str()); +		rx = boost::lexical_cast<S32>((*(++iter)).c_str()); +		ry = boost::lexical_cast<S32>((*(++iter)).c_str()); +		rz = boost::lexical_cast<S32>((*(++iter)).c_str()); +		lx = boost::lexical_cast<S32>((*(++iter)).c_str()); +		ly = boost::lexical_cast<S32>((*(++iter)).c_str()); +		lz = boost::lexical_cast<S32>((*(++iter)).c_str()); +	} +	catch( boost::bad_lexical_cast& ) +	{ +		LL_WARNS("parse_lure_bucket") +			<< "Couldn't parse lure bucket." +			<< LL_ENDL; +		return false; +	}  	// Grab region access  	region_access = SIM_ACCESS_MIN;  	if (++iter != tokens.end()) @@ -1925,6 +1989,7 @@ static void parse_lure_bucket(const std::string& bucket,  	look_at.setVec((F32)lx, (F32)ly, (F32)lz);  	region_handle = to_region_handle(gx, gy); +	return true;  }  void process_improved_im(LLMessageSystem *msg, void **user_data) @@ -2484,7 +2549,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)  			// Note: lie to Nearby Chat, pretending that this is NOT an IM, because  			// IMs from obejcts don't open IM sessions.  			LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); -			if(nearby_chat) +			if(SYSTEM_FROM != name && nearby_chat)  			{  				LLSD args;  				args["owner_id"] = from_id; @@ -2562,15 +2627,21 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)  				U64 region_handle;  				U8 region_access;  				std::string region_info = ll_safe_string((char*)binary_bucket, binary_bucket_size); -				parse_lure_bucket(region_info, region_handle, pos, look_at, region_access); +				std::string region_access_str = LLStringUtil::null; +				std::string region_access_icn = LLStringUtil::null; -				std::string region_access_str = LLViewerRegion::accessToString(region_access); +				if (parse_lure_bucket(region_info, region_handle, pos, look_at, region_access)) +				{ +					region_access_str = LLViewerRegion::accessToString(region_access); +					region_access_icn = LLViewerRegion::getAccessIcon(region_access); +				}  				LLSD args;  				// *TODO: Translate -> [FIRST] [LAST] (maybe)  				args["NAME_SLURL"] = LLSLURL::buildCommand("agent", from_id, "about");  				args["MESSAGE"] = message; -				args["MATURITY"] = region_access_str; +				args["MATURITY_STR"] = region_access_str; +				args["MATURITY_ICON"] = region_access_icn;  				LLSD payload;  				payload["from_id"] = from_id;  				payload["lure_id"] = session_id; diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index 7c021dc05f..72ad3c8926 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -40,6 +40,7 @@  #include "lluuid.h"  #include "message.h"  #include "stdenums.h" +#include "llnotifications.h"  //  // Forward declarations @@ -210,11 +211,10 @@ bool highlight_offered_item(const LLUUID& item_id);  void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder_uuid); -struct LLOfferInfo +class LLOfferInfo : public LLNotificationResponderInterface  { -        LLOfferInfo() -	:	mFromGroup(FALSE), mFromObject(FALSE), -		mIM(IM_NOTHING_SPECIAL), mType(LLAssetType::AT_NONE) {}; +public: +	LLOfferInfo();  	LLOfferInfo(const LLSD& sd);  	LLOfferInfo(const LLOfferInfo& info); @@ -232,12 +232,27 @@ struct LLOfferInfo  	std::string mFromName;  	std::string mDesc;  	LLHost mHost; +	bool mPersist; + +	// LLNotificationResponderInterface implementation +	/*virtual*/ LLSD asLLSD(); +	/*virtual*/ void fromLLSD(const LLSD& params); +	/*virtual*/ void handleRespond(const LLSD& notification, const LLSD& response); -	LLSD asLLSD();  	void send_auto_receive_response(void); + +	// TODO - replace all references with handleRespond()  	bool inventory_offer_callback(const LLSD& notification, const LLSD& response);  	bool inventory_task_offer_callback(const LLSD& notification, const LLSD& response); +private: + +	void initRespondFunctionMap(); + +	typedef boost::function<bool (const LLSD&, const LLSD&)> respond_function_t; +	typedef std::map<std::string, respond_function_t> respond_function_map_t; + +	respond_function_map_t mRespondFunctions;  };  void process_feature_disabled_message(LLMessageSystem* msg, void**); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 07d4ac664f..c48668df9a 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -627,6 +627,26 @@ std::string LLViewerRegion::accessToString(U8 sim_access)  }  // static +std::string LLViewerRegion::getAccessIcon(U8 sim_access) +{ +	switch(sim_access) +	{ +	case SIM_ACCESS_MATURE: +		return "Parcel_M_Dark"; + +	case SIM_ACCESS_ADULT: +		return "Parcel_R_Light"; + +	case SIM_ACCESS_PG: +		return "Parcel_PG_Light"; + +	case SIM_ACCESS_MIN: +	default: +		return ""; +	} +} + +// static  std::string LLViewerRegion::accessToShortString(U8 sim_access)  {  	switch(sim_access)		/* Flawfinder: ignore */ diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 361ae87e1b..5c4d5a61fd 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -2,25 +2,31 @@   * @file llviewerregion.h   * @brief Description of the LLViewerRegion class.   * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2001&license=viewergpl$ + *  + * Copyright (c) 2001-2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ @@ -93,8 +99,9 @@ public:  	~LLViewerRegion();  	// Call this after you have the region name and handle. -	void loadObjectCache(); -	void saveObjectCache(); +	void loadCache(); + +	void saveCache();  	void sendMessage(); // Send the current message to this region's simulator  	void sendReliableMessage(); // Send the current message to this region's simulator @@ -284,7 +291,6 @@ public:  	friend std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion);      /// implements LLCapabilityProvider      virtual std::string getDescription() const; -	std::string getHttpUrl() const { return mHttpUrl ;}  	LLSpatialPartition* getSpatialPartition(U32 type);  public: @@ -323,9 +329,6 @@ public:  	LLDynamicArray<LLUUID> mMapAvatarIDs;  private: -	// determine the cache filename for the region from the region handle -	const std::string getObjectCacheFilename(U64 mHandle) const; -  	// The surfaces and other layers  	LLSurface*	mLandp; @@ -380,7 +383,6 @@ private:  	std::string mColoName;  	std::string mProductSKU;  	std::string mProductName; -	std::string mHttpUrl ;  	// Maps local ids to cache entries. @@ -400,7 +402,7 @@ private:  	// Cache ID is unique per-region, across renames, moving locations,  	// etc.  	LLUUID mCacheID; - +	  	typedef std::map<std::string, std::string> CapabilityMap;  	CapabilityMap mCapabilities; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index a5adb11c53..c883087cf2 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1564,10 +1564,6 @@ F32 LLViewerFetchedTexture::calcDecodePriority()  		// larger mips are corrupted  		priority = -3.0f;  	} -	else if (cur_discard <= mDesiredDiscardLevel) -	{ -		priority = -4.0f; -	}  	else  	{  		// priority range = 100,000 - 500,000 diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 7473adda1f..63f060b58a 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2238,7 +2238,6 @@ LLGLuint LLVOAvatarSelf::getScratchTexName( LLGLenum format, S32& components, U3  	{  		case GL_LUMINANCE:			components = 1; internal_format = GL_LUMINANCE8;		break;  		case GL_ALPHA:				components = 1; internal_format = GL_ALPHA8;			break; -		case GL_COLOR_INDEX:		components = 1; internal_format = GL_COLOR_INDEX8_EXT;	break;  		case GL_LUMINANCE_ALPHA:	components = 2; internal_format = GL_LUMINANCE8_ALPHA8;	break;  		case GL_RGB:				components = 3; internal_format = GL_RGB8;				break;  		case GL_RGBA:				components = 4; internal_format = GL_RGBA8;				break; diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 29d2745d6e..3d110dcc78 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -2,25 +2,30 @@   * @file llwearableitemslist.cpp   * @brief A flat list of wearable items.   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + *   * 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 + * 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$   */ @@ -28,15 +33,8 @@  #include "llwearableitemslist.h" -#include "lliconctrl.h" -#include "llmenugl.h" // for LLContextMenu - -#include "llagentwearables.h" -#include "llappearancemgr.h"  #include "llinventoryfunctions.h" -#include "lltransutil.h" -#include "llviewerattachmenu.h" -#include "llvoavatarself.h" +#include "llinventorymodel.h"  class LLFindOutfitItems : public LLInventoryCollectFunctor  { @@ -62,573 +60,19 @@ bool LLFindOutfitItems::operator()(LLInventoryCategory* cat,  	return FALSE;  } -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - -void LLPanelWearableListItem::onMouseEnter(S32 x, S32 y, MASK mask) -{ -	LLPanelInventoryListItemBase::onMouseEnter(x, y, mask); -	setWidgetsVisible(true); -	reshapeWidgets(); -} - -void LLPanelWearableListItem::onMouseLeave(S32 x, S32 y, MASK mask) -{ -	LLPanelInventoryListItemBase::onMouseLeave(x, y, mask); -	setWidgetsVisible(false); -	reshapeWidgets(); -} - -LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item, const LLPanelWearableListItem::Params& params) -: LLPanelInventoryListItemBase(item, params) -{ -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - -// static -LLPanelWearableOutfitItem* LLPanelWearableOutfitItem::create(LLViewerInventoryItem* item, -															 bool worn_indication_enabled) -{ -	LLPanelWearableOutfitItem* list_item = NULL; -	if (item) -	{ -		const LLPanelInventoryListItemBase::Params& params = LLUICtrlFactory::getDefaultParams<LLPanelInventoryListItemBase>(); - -		list_item = new LLPanelWearableOutfitItem(item, worn_indication_enabled, params); -		list_item->initFromParams(params); -		list_item->postBuild(); -	} -	return list_item; -} - -LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item, -													 bool worn_indication_enabled, -													 const LLPanelWearableOutfitItem::Params& params) -: LLPanelInventoryListItemBase(item, params) -, mWornIndicationEnabled(worn_indication_enabled) -{ -} - -// virtual -void LLPanelWearableOutfitItem::updateItem(const std::string& name, -										   EItemState item_state) -{ -	std::string search_label = name; - -	if (mWornIndicationEnabled && get_is_item_worn(mInventoryItemUUID)) -	{ -		search_label += LLTrans::getString("worn"); -		item_state = IS_WORN; -	} - -	LLPanelInventoryListItemBase::updateItem(search_label, item_state); -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelClothingListItem(&typeid(LLPanelClothingListItem::Params), "clothing_list_item"); - - -LLPanelClothingListItem::Params::Params() -:	up_btn("up_btn"), -	down_btn("down_btn"), -	edit_btn("edit_btn"), -	lock_panel("lock_panel"), -	edit_panel("edit_panel"), -	lock_icon("lock_icon") -{} - -// static -LLPanelClothingListItem* LLPanelClothingListItem::create(LLViewerInventoryItem* item) -{ -	LLPanelClothingListItem* list_item = NULL; -	if(item) -	{ -		const LLPanelClothingListItem::Params& params = LLUICtrlFactory::getDefaultParams<LLPanelClothingListItem>(); -		list_item = new LLPanelClothingListItem(item, params); -		list_item->initFromParams(params); -		list_item->postBuild(); -	} -	return list_item; -} - -LLPanelClothingListItem::LLPanelClothingListItem(LLViewerInventoryItem* item, const LLPanelClothingListItem::Params& params) - : LLPanelDeletableWearableListItem(item, params) -{ -	LLButton::Params button_params = params.up_btn; -	applyXUILayout(button_params, this); -	addChild(LLUICtrlFactory::create<LLButton>(button_params)); - -	button_params = params.down_btn; -	applyXUILayout(button_params, this); -	addChild(LLUICtrlFactory::create<LLButton>(button_params)); - -	LLPanel::Params panel_params = params.lock_panel; -	applyXUILayout(panel_params, this); -	LLPanel* lock_panelp = LLUICtrlFactory::create<LLPanel>(panel_params); -	addChild(lock_panelp); - -	panel_params = params.edit_panel; -	applyXUILayout(panel_params, this); -	LLPanel* edit_panelp = LLUICtrlFactory::create<LLPanel>(panel_params); -	addChild(edit_panelp); - -	if (lock_panelp) -{ -		LLIconCtrl::Params icon_params = params.lock_icon; -		applyXUILayout(icon_params, this); -		lock_panelp->addChild(LLUICtrlFactory::create<LLIconCtrl>(icon_params)); -} - -	if (edit_panelp) -{ -		button_params = params.edit_btn; -		applyXUILayout(button_params, this); -		edit_panelp->addChild(LLUICtrlFactory::create<LLButton>(button_params)); -	} - -	setSeparatorVisible(false); -} - -LLPanelClothingListItem::~LLPanelClothingListItem() -{ -} - -BOOL LLPanelClothingListItem::postBuild() -{ -	LLPanelDeletableWearableListItem::postBuild(); - -	addWidgetToRightSide("btn_move_up"); -	addWidgetToRightSide("btn_move_down"); -	addWidgetToRightSide("btn_lock"); -	addWidgetToRightSide("btn_edit_panel"); - -	setWidgetsVisible(false); -	reshapeWidgets(); - -	return TRUE; -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelBodyPartsListItem(&typeid(LLPanelBodyPartsListItem::Params), "bodyparts_list_item"); - - -LLPanelBodyPartsListItem::Params::Params() -:	edit_btn("edit_btn"), -	edit_panel("edit_panel"), -	lock_panel("lock_panel"), -	lock_icon("lock_icon") -{} - -// static -LLPanelBodyPartsListItem* LLPanelBodyPartsListItem::create(LLViewerInventoryItem* item) -{ -	LLPanelBodyPartsListItem* list_item = NULL; -	if(item) -	{ -		const Params& params = LLUICtrlFactory::getDefaultParams<LLPanelBodyPartsListItem>(); -		list_item = new LLPanelBodyPartsListItem(item, params); -		list_item->initFromParams(params); -		list_item->postBuild(); -	} -	return list_item; -} - -LLPanelBodyPartsListItem::LLPanelBodyPartsListItem(LLViewerInventoryItem* item, const LLPanelBodyPartsListItem::Params& params) -: LLPanelWearableListItem(item, params) -{ -	LLPanel::Params panel_params = params.edit_panel; -	applyXUILayout(panel_params, this); -	LLPanel* edit_panelp = LLUICtrlFactory::create<LLPanel>(panel_params); -	addChild(edit_panelp); - -	panel_params = params.lock_panel; -	applyXUILayout(panel_params, this); -	LLPanel* lock_panelp = LLUICtrlFactory::create<LLPanel>(panel_params); -	addChild(lock_panelp); -	 -	if (edit_panelp) -	{ -		LLButton::Params btn_params = params.edit_btn; -		applyXUILayout(btn_params, this); -		edit_panelp->addChild(LLUICtrlFactory::create<LLButton>(btn_params)); -} - -	if (lock_panelp) -{ -		LLIconCtrl::Params icon_params = params.lock_icon; -		applyXUILayout(icon_params, this); -		lock_panelp->addChild(LLUICtrlFactory::create<LLIconCtrl>(icon_params)); -	} - -	setSeparatorVisible(true); -} - -LLPanelBodyPartsListItem::~LLPanelBodyPartsListItem() -{ -} - -BOOL LLPanelBodyPartsListItem::postBuild() -{ -	LLPanelInventoryListItemBase::postBuild(); - -	addWidgetToRightSide("btn_lock"); -	addWidgetToRightSide("btn_edit_panel"); - -	return TRUE; -} - -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDeletableWearableListItem(&typeid(LLPanelDeletableWearableListItem::Params), "deletable_wearable_list_item"); - -LLPanelDeletableWearableListItem::Params::Params() -:	delete_btn("delete_btn") -{} - -// static -LLPanelDeletableWearableListItem* LLPanelDeletableWearableListItem::create(LLViewerInventoryItem* item) -{ -	LLPanelDeletableWearableListItem* list_item = NULL; -	if(item) -	{ -		const Params& params = LLUICtrlFactory::getDefaultParams<LLPanelDeletableWearableListItem>(); -		list_item = new LLPanelDeletableWearableListItem(item, params); -		list_item->initFromParams(params); -		list_item->postBuild(); -	} -	return list_item; -} - -LLPanelDeletableWearableListItem::LLPanelDeletableWearableListItem(LLViewerInventoryItem* item, const LLPanelDeletableWearableListItem::Params& params) -: LLPanelWearableListItem(item, params) -{ -	LLButton::Params button_params = params.delete_btn; -	applyXUILayout(button_params, this); -	addChild(LLUICtrlFactory::create<LLButton>(button_params)); - -	setSeparatorVisible(true); -} - -BOOL LLPanelDeletableWearableListItem::postBuild() -{ -	LLPanelWearableListItem::postBuild(); - -	addWidgetToLeftSide("btn_delete"); - -	LLButton* delete_btn = getChild<LLButton>("btn_delete"); -	// Reserve space for 'delete' button event if it is invisible. -	setLeftWidgetsWidth(delete_btn->getRect().mRight); - -	setWidgetsVisible(false); -	reshapeWidgets(); - -	return TRUE; -} - - -// static -LLPanelAttachmentListItem* LLPanelAttachmentListItem::create(LLViewerInventoryItem* item) -{ -	LLPanelAttachmentListItem* list_item = NULL; -	if(item) -	{ -		const Params& params = LLUICtrlFactory::getDefaultParams<LLPanelDeletableWearableListItem>(); - -		list_item = new LLPanelAttachmentListItem(item, params); -		list_item->initFromParams(params); -		list_item->postBuild(); -	} -	return list_item; -} - -void LLPanelAttachmentListItem::updateItem(const std::string& name, -										   EItemState item_state) -{ -	std::string title_joint = name; - -	LLViewerInventoryItem* inv_item = getItem(); -	if (inv_item && isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(inv_item->getLinkedUUID())) -	{ -		std::string joint = LLTrans::getString(gAgentAvatarp->getAttachedPointName(inv_item->getLinkedUUID())); -		title_joint =  title_joint + " (" + joint + ")"; -	} - -	LLPanelInventoryListItemBase::updateItem(title_joint, item_state); -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDummyClothingListItem(&typeid(LLPanelDummyClothingListItem::Params), "dummy_clothing_list_item"); - -LLPanelDummyClothingListItem::Params::Params() -:	add_panel("add_panel"), -	add_btn("add_btn") -{} - -LLPanelDummyClothingListItem* LLPanelDummyClothingListItem::create(LLWearableType::EType w_type) -{ -	const Params& params = LLUICtrlFactory::getDefaultParams<LLPanelDummyClothingListItem>(); - -	LLPanelDummyClothingListItem* list_item = new LLPanelDummyClothingListItem(w_type, params); -	list_item->initFromParams(params); -	list_item->postBuild(); -	return list_item; -} - -BOOL LLPanelDummyClothingListItem::postBuild() -{ -	addWidgetToRightSide("btn_add_panel"); - -	setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, FALSE)); -	updateItem(wearableTypeToString(mWearableType)); - -	// Make it look loke clothing item - reserve space for 'delete' button -	setLeftWidgetsWidth(getChildView("item_icon")->getRect().mLeft); - -	setWidgetsVisible(false); -	reshapeWidgets(); - -	return TRUE; -} - -LLWearableType::EType LLPanelDummyClothingListItem::getWearableType() const -{ -	return mWearableType; -} - -LLPanelDummyClothingListItem::LLPanelDummyClothingListItem(LLWearableType::EType w_type, const LLPanelDummyClothingListItem::Params& params) -:	LLPanelWearableListItem(NULL, params),  -	mWearableType(w_type) -{ -	LLPanel::Params panel_params(params.add_panel); -	applyXUILayout(panel_params, this); -	LLPanel* add_panelp = LLUICtrlFactory::create<LLPanel>(panel_params); -	addChild(add_panelp); - -	if (add_panelp) -{ -		LLButton::Params button_params(params.add_btn); -		applyXUILayout(button_params, this); -		add_panelp->addChild(LLUICtrlFactory::create<LLButton>(button_params)); -} - -	setSeparatorVisible(true); -} - -typedef std::map<LLWearableType::EType, std::string> clothing_to_string_map_t; - -clothing_to_string_map_t init_clothing_string_map() -{ -	clothing_to_string_map_t w_map; -	w_map.insert(std::make_pair(LLWearableType::WT_SHIRT, "shirt_not_worn")); -	w_map.insert(std::make_pair(LLWearableType::WT_PANTS, "pants_not_worn")); -	w_map.insert(std::make_pair(LLWearableType::WT_SHOES, "shoes_not_worn")); -	w_map.insert(std::make_pair(LLWearableType::WT_SOCKS, "socks_not_worn")); -	w_map.insert(std::make_pair(LLWearableType::WT_JACKET, "jacket_not_worn")); -	w_map.insert(std::make_pair(LLWearableType::WT_GLOVES, "gloves_not_worn")); -	w_map.insert(std::make_pair(LLWearableType::WT_UNDERSHIRT, "undershirt_not_worn")); -	w_map.insert(std::make_pair(LLWearableType::WT_UNDERPANTS, "underpants_not_worn")); -	w_map.insert(std::make_pair(LLWearableType::WT_SKIRT, "skirt_not_worn")); -	w_map.insert(std::make_pair(LLWearableType::WT_ALPHA, "alpha_not_worn")); -	w_map.insert(std::make_pair(LLWearableType::WT_TATTOO, "tattoo_not_worn")); -	return w_map; -} - -std::string LLPanelDummyClothingListItem::wearableTypeToString(LLWearableType::EType w_type) -{ -	static const clothing_to_string_map_t w_map = init_clothing_string_map(); -	static const std::string invalid_str = LLTrans::getString("invalid_not_worn"); -	 -	std::string type_str = invalid_str; -	clothing_to_string_map_t::const_iterator it = w_map.find(w_type); -	if(w_map.end() != it) -	{ -		type_str = LLTrans::getString(it->second); -	} -	return type_str; -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - -LLWearableItemTypeNameComparator::LLWearableTypeOrder::LLWearableTypeOrder(LLWearableItemTypeNameComparator::ETypeListOrder order_priority, bool sort_asset_by_name, bool sort_wearable_by_name): -		mOrderPriority(order_priority), -		mSortAssetTypeByName(sort_asset_by_name), -		mSortWearableTypeByName(sort_wearable_by_name) -{ -} - -LLWearableItemTypeNameComparator::LLWearableItemTypeNameComparator() -{ -	// By default the sort order conforms the order by spec of MY OUTFITS items list: -	// 1. CLOTHING - sorted by name -	// 2. OBJECT   - sorted by type -	// 3. BODYPART - sorted by name -	mWearableOrder[LLAssetType::AT_CLOTHING] = LLWearableTypeOrder(ORDER_RANK_1, false, false); -	mWearableOrder[LLAssetType::AT_OBJECT]   = LLWearableTypeOrder(ORDER_RANK_2, true, true); -	mWearableOrder[LLAssetType::AT_BODYPART] = LLWearableTypeOrder(ORDER_RANK_3, false, true); -} - -void LLWearableItemTypeNameComparator::setOrder(LLAssetType::EType items_of_type,  LLWearableItemTypeNameComparator::ETypeListOrder order_priority, bool sort_asset_items_by_name, bool sort_wearable_items_by_name) -{ -	mWearableOrder[items_of_type] = LLWearableTypeOrder(order_priority, sort_asset_items_by_name, sort_wearable_items_by_name); -} - -/*virtual*/ -bool LLWearableItemNameComparator::doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const -{ -	std::string name1 = wearable_item1->getItemName(); -	std::string name2 = wearable_item2->getItemName(); - -	LLStringUtil::toUpper(name1); -	LLStringUtil::toUpper(name2); - -	return name1 < name2; -} - -/*virtual*/ -bool LLWearableItemTypeNameComparator::doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const -{ -	const LLAssetType::EType item_type1 = wearable_item1->getType(); -	const LLAssetType::EType item_type2 = wearable_item2->getType(); - -	LLWearableItemTypeNameComparator::ETypeListOrder item_type_order1 = getTypeListOrder(item_type1); -	LLWearableItemTypeNameComparator::ETypeListOrder item_type_order2 = getTypeListOrder(item_type2); - -	if (item_type_order1 != item_type_order2) -	{ -		// If items are of different asset types we can compare them -		// by types order in the list. -		return item_type_order1 < item_type_order2; -	} - -	if (sortAssetTypeByName(item_type1)) -	{ -		// If both items are of the same asset type except AT_CLOTHING and AT_BODYPART -		// we can compare them by name. -		return LLWearableItemNameComparator::doCompare(wearable_item1, wearable_item2); -	} - -	const LLWearableType::EType item_wearable_type1 = wearable_item1->getWearableType(); -	const LLWearableType::EType item_wearable_type2 = wearable_item2->getWearableType(); - -	if (item_wearable_type1 != item_wearable_type2) -	{ -		// If items are of different LLWearableType::EType types they are compared -		// by LLWearableType::EType. types order determined in LLWearableType::EType. -		return item_wearable_type1 < item_wearable_type2; -	} -	else -	{ -		// If both items are of the same clothing type they are compared -		// by description and place in reverse order (i.e. outer layer item -		// on top) OR by name -		if(sortWearableTypeByName(item_type1)) -		{ -			return LLWearableItemNameComparator::doCompare(wearable_item1, wearable_item2); -		} -		return wearable_item1->getDescription() > wearable_item2->getDescription(); -	} -} - -LLWearableItemTypeNameComparator::ETypeListOrder LLWearableItemTypeNameComparator::getTypeListOrder(LLAssetType::EType item_type) const -{ -	wearable_type_order_map_t::const_iterator const_it = mWearableOrder.find(item_type); - -	if(const_it == mWearableOrder.end()) -	{ -		llwarns<<"Absent information about order rang of items of "<<LLAssetType::getDesc(item_type)<<" type"<<llendl; -		return ORDER_RANK_UNKNOWN; -	} - -	return const_it->second.mOrderPriority; -} - -bool LLWearableItemTypeNameComparator::sortAssetTypeByName(LLAssetType::EType item_type) const -{ -	wearable_type_order_map_t::const_iterator const_it = mWearableOrder.find(item_type); - -	if(const_it == mWearableOrder.end()) -	{ -		llwarns<<"Absent information about sorting items of "<<LLAssetType::getDesc(item_type)<<" type"<<llendl; -		return true; -	} - -	return const_it->second.mSortAssetTypeByName; -} - -bool LLWearableItemTypeNameComparator::sortWearableTypeByName(LLAssetType::EType item_type) const -{ -	wearable_type_order_map_t::const_iterator const_it = mWearableOrder.find(item_type); - -	if(const_it == mWearableOrder.end()) -	{ -		llwarns<<"Absent information about sorting items of "<<LLAssetType::getDesc(item_type)<<" type"<<llendl; -		return true; -	} - -	return const_it->second.mSortWearableTypeByName; -} -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - -static const LLWearableItemTypeNameComparator WEARABLE_TYPE_NAME_COMPARATOR; -  static const LLDefaultChildRegistry::Register<LLWearableItemsList> r("wearable_items_list");  LLWearableItemsList::Params::Params() -:	standalone("standalone", true) -,	worn_indication_enabled("worn_indication_enabled", true)  {}  LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p)  :	LLInventoryItemsList(p) -{ -	setComparator(&WEARABLE_TYPE_NAME_COMPARATOR); -	mIsStandalone = p.standalone; -	if (mIsStandalone) -	{ -		// Use built-in context menu. -		setRightMouseDownCallback(boost::bind(&LLWearableItemsList::onRightClick, this, _2, _3)); -	} -	mWornIndicationEnabled = p.worn_indication_enabled; -} +{}  // virtual  LLWearableItemsList::~LLWearableItemsList()  {} -// virtual -void LLWearableItemsList::addNewItem(LLViewerInventoryItem* item, bool rearrange /*= true*/) -{ -	if (!item) -	{ -		llwarns << "No inventory item. Couldn't create flat list item." << llendl; -		llassert(item != NULL); -	} - -	LLPanelWearableOutfitItem *list_item = LLPanelWearableOutfitItem::create(item, mWornIndicationEnabled); -	if (!list_item) -		return; - -	bool is_item_added = addItem(list_item, item->getUUID(), ADD_BOTTOM, rearrange); -	if (!is_item_added) -	{ -		llwarns << "Couldn't add flat list item." << llendl; -		llassert(is_item_added); -	} -} -  void LLWearableItemsList::updateList(const LLUUID& category_id)  {  	LLInventoryModel::cat_array_t cat_array; @@ -645,291 +89,3 @@ void LLWearableItemsList::updateList(const LLUUID& category_id)  	refreshList(item_array);  } - -void LLWearableItemsList::updateChangedItems(const LLInventoryModel::changed_items_t& changed_items_uuids) -{ -	// nothing to update -	if (changed_items_uuids.empty()) return; - -	typedef std::vector<LLPanel*> item_panel_list_t; - -	item_panel_list_t items; -	getItems(items); - -	for (item_panel_list_t::iterator items_iter = items.begin(); -			items_iter != items.end(); -			++items_iter) -	{ -		LLPanelInventoryListItemBase* item = dynamic_cast<LLPanelInventoryListItemBase*>(*items_iter); -		if (!item) continue; - -		LLViewerInventoryItem* inv_item = item->getItem(); -		if (!inv_item) continue; - -		LLUUID linked_uuid = inv_item->getLinkedUUID(); - -		for (LLInventoryModel::changed_items_t::const_iterator iter = changed_items_uuids.begin(); -				iter != changed_items_uuids.end(); -				++iter) -		{ -			if (linked_uuid == *iter) -			{ -				item->setNeedsRefresh(true); -				break; -			} -		} -	} -} - -void LLWearableItemsList::onRightClick(S32 x, S32 y) -{ -	uuid_vec_t selected_uuids; - -	getSelectedUUIDs(selected_uuids); -	if (selected_uuids.empty()) -	{ -		return; -	} - -	ContextMenu::instance().show(this, selected_uuids, x, y); -} - -////////////////////////////////////////////////////////////////////////// -/// ContextMenu -////////////////////////////////////////////////////////////////////////// - -LLWearableItemsList::ContextMenu::ContextMenu() -:	mParent(NULL) -{ -} - -void LLWearableItemsList::ContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y) -{ -	mParent = dynamic_cast<LLWearableItemsList*>(spawning_view); -	LLListContextMenu::show(spawning_view, uuids, x, y); -	mParent = NULL; // to avoid dereferencing an invalid pointer -} - -// virtual -LLContextMenu* LLWearableItemsList::ContextMenu::createMenu() -{ -	LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; -	const uuid_vec_t& ids = mUUIDs;		// selected items IDs -	LLUUID selected_id = ids.front();	// ID of the first selected item - -	functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1); - -	// Register handlers common for all wearable types. -	registrar.add("Wearable.Wear", boost::bind(wear_multiple, ids, true)); -	registrar.add("Wearable.Add", boost::bind(wear_multiple, ids, false)); -	registrar.add("Wearable.Edit", boost::bind(handleMultiple, LLAgentWearables::editWearable, ids)); -	registrar.add("Wearable.CreateNew", boost::bind(createNewWearable, selected_id)); -	registrar.add("Wearable.ShowOriginal", boost::bind(show_item_original, selected_id)); -	registrar.add("Wearable.TakeOffDetach", boost::bind(handleMultiple, take_off, ids)); - -	// Register handlers for clothing. -	registrar.add("Clothing.TakeOff", boost::bind(handleMultiple, take_off, ids)); - -	// Register handlers for body parts. - -	// Register handlers for attachments. -	registrar.add("Attachment.Detach", boost::bind(handleMultiple, take_off, ids)); -	registrar.add("Attachment.Profile", boost::bind(show_item_profile, selected_id)); -	registrar.add("Object.Attach", boost::bind(LLViewerAttachMenu::attachObjects, ids, _2)); - -	// Create the menu. -	LLContextMenu* menu = createFromFile("menu_wearable_list_item.xml"); - -	// Determine which items should be visible/enabled. -	updateItemsVisibility(menu); - -	// Update labels for the items requiring that. -	updateItemsLabels(menu); -	return menu; -} - -void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu) -{ -	if (!menu) -	{ -		llwarns << "Invalid menu" << llendl; -		return; -	} - -	const uuid_vec_t& ids = mUUIDs;	// selected items IDs -	U32 mask = 0;					// mask of selected items' types -	U32 n_items = ids.size();		// number of selected items -	U32 n_worn = 0;					// number of worn items among the selected ones -	U32 n_already_worn = 0;			// number of items worn of same type as selected items -	U32 n_links = 0;				// number of links among the selected items -	U32 n_editable = 0;				// number of editable items among the selected ones - -	for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) -	{ -		LLUUID id = *it; -		LLViewerInventoryItem* item = gInventory.getItem(id); - -		if (!item) -		{ -			llwarns << "Invalid item" << llendl; -			// *NOTE: the logic below may not work in this case -			continue; -		} - -		updateMask(mask, item->getType()); - -		const LLWearableType::EType wearable_type = item->getWearableType(); -		const bool is_link = item->getIsLinkType(); -		const bool is_worn = get_is_item_worn(id); -		const bool is_editable = gAgentWearables.isWearableModifiable(id); -		const bool is_already_worn = gAgentWearables.selfHasWearable(wearable_type); -		if (is_worn) -		{ -			++n_worn; -		} -		if (is_editable) -		{ -			++n_editable; -		} -		if (is_link) -		{ -			++n_links; -		} -		if (is_already_worn) -		{ -			++n_already_worn; -		} -	} // for - -	bool standalone = mParent ? mParent->isStandalone() : false; - -	// *TODO: eliminate multiple traversals over the menu items -	setMenuItemVisible(menu, "wear_wear", 			n_already_worn == 0 && n_worn == 0); -	setMenuItemEnabled(menu, "wear_wear", 			n_already_worn == 0 && n_worn == 0); -	setMenuItemVisible(menu, "wear_add",			mask == MASK_CLOTHING && n_worn == 0 && n_already_worn != 0); -	setMenuItemEnabled(menu, "wear_add",			n_items == 1 && canAddWearable(ids.front()) && n_already_worn != 0); -	setMenuItemVisible(menu, "wear_replace",		n_worn == 0 && n_already_worn != 0); -	//visible only when one item selected and this item is worn -	setMenuItemVisible(menu, "edit",				!standalone && mask & (MASK_CLOTHING|MASK_BODYPART) && n_worn == n_items && n_worn == 1); -	setMenuItemEnabled(menu, "edit",				n_editable == 1 && n_worn == 1 && n_items == 1); -	setMenuItemVisible(menu, "create_new",			mask & (MASK_CLOTHING|MASK_BODYPART) && n_items == 1); -	setMenuItemVisible(menu, "show_original",		!standalone); -	setMenuItemEnabled(menu, "show_original",		n_items == 1 && n_links == n_items); -	setMenuItemVisible(menu, "take_off",			mask == MASK_CLOTHING && n_worn == n_items); -	setMenuItemVisible(menu, "detach",				mask == MASK_ATTACHMENT && n_worn == n_items); -	setMenuItemVisible(menu, "take_off_or_detach",	mask == (MASK_ATTACHMENT|MASK_CLOTHING)); -	setMenuItemEnabled(menu, "take_off_or_detach",	n_worn == n_items); -	setMenuItemVisible(menu, "object_profile",		!standalone); -	setMenuItemEnabled(menu, "object_profile",		n_items == 1); -	setMenuItemVisible(menu, "--no options--", 		FALSE); -	setMenuItemEnabled(menu, "--no options--",		FALSE); - -	// Populate or hide the "Attach to..." / "Attach to HUD..." submenus. -	if (mask == MASK_ATTACHMENT && n_worn == 0) -	{ -		LLViewerAttachMenu::populateMenus("wearable_attach_to", "wearable_attach_to_hud"); -	} -	else -	{ -		setMenuItemVisible(menu, "wearable_attach_to",			false); -		setMenuItemVisible(menu, "wearable_attach_to_hud",		false); -	} - -	if (mask & MASK_UNKNOWN) -	{ -		llwarns << "Non-wearable items passed." << llendl; -	} - -	U32 num_visible_items = 0; -	for (U32 menu_item_index = 0; menu_item_index < menu->getItemCount(); ++menu_item_index) -	{ -		const LLMenuItemGL* menu_item = menu->getItem(menu_item_index); -		if (menu_item && menu_item->getVisible()) -		{ -			num_visible_items++; -		} -	} -	if (num_visible_items == 0) -	{ -		setMenuItemVisible(menu, "--no options--", TRUE); -	} -} - -void LLWearableItemsList::ContextMenu::updateItemsLabels(LLContextMenu* menu) -{ -	llassert(menu); -	if (!menu) return; - -	// Set proper label for the "Create new <WEARABLE_TYPE>" menu item. -	LLViewerInventoryItem* item = gInventory.getLinkedItem(mUUIDs.back()); -	if (!item || !item->isWearableType()) return; - -	LLWearableType::EType w_type = item->getWearableType(); -	std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getTypeName(w_type)); - -	LLMenuItemGL* menu_item = menu->getChild<LLMenuItemGL>("create_new"); -	menu_item->setLabel(new_label); -} - -// We need this method to convert non-zero BOOL values to exactly 1 (TRUE). -// Otherwise code relying on a BOOL value being TRUE may fail -// (I experienced a weird assert in LLView::drawChildren() because of that. -// static -void LLWearableItemsList::ContextMenu::setMenuItemVisible(LLContextMenu* menu, const std::string& name, bool val) -{ -	menu->setItemVisible(name, val); -} - -// static -void LLWearableItemsList::ContextMenu::setMenuItemEnabled(LLContextMenu* menu, const std::string& name, bool val) -{ -	menu->setItemEnabled(name, val); -} - -// static -void LLWearableItemsList::ContextMenu::updateMask(U32& mask, LLAssetType::EType at) -{ -	if (at == LLAssetType::AT_CLOTHING) -	{ -		mask |= MASK_CLOTHING; -	} -	else if (at == LLAssetType::AT_BODYPART) -	{ -		mask |= MASK_BODYPART; -	} -	else if (at == LLAssetType::AT_OBJECT) -	{ -		mask |= MASK_ATTACHMENT; -	} -	else -	{ -		mask |= MASK_UNKNOWN; -	} -} - -// static -void LLWearableItemsList::ContextMenu::createNewWearable(const LLUUID& item_id) -{ -	LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id); -	if (!item || !item->isWearableType()) return; - -	LLAgentWearables::createWearable(item->getWearableType(), true); -} - -// Can we wear another wearable of the given item's wearable type? -// static -bool LLWearableItemsList::ContextMenu::canAddWearable(const LLUUID& item_id) -{ -	// TODO: investigate wearables may not be loaded at this point EXT-8231 - -	LLViewerInventoryItem* item = gInventory.getItem(item_id); -	if (!item || item->getType() != LLAssetType::AT_CLOTHING) -	{ -		return false; -	} - -	U32 wearable_count = gAgentWearables.getWearableCount(item->getWearableType()); -	return wearable_count < LLAgentWearables::MAX_CLOTHING_PER_TYPE; -} - -// EOF diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 854c37c2c1..e7ccba8e6c 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -2,377 +2,40 @@   * @file llwearableitemslist.h   * @brief A flat list of wearable items.   * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + *   * 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 + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab.  Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE.   * $/LicenseInfo$   */  #ifndef LL_LLWEARABLEITEMSLIST_H  #define LL_LLWEARABLEITEMSLIST_H -// libs  #include "llpanel.h" -#include "llsingleton.h"  // newview  #include "llinventoryitemslist.h" -#include "llinventorylistitem.h" -#include "llinventorymodel.h" -#include "lllistcontextmenu.h" -#include "llwearabletype.h" - -/** - * @class LLPanelWearableListItem - * - * Extends LLPanelInventoryListItemBase: - * - makes side widgets show on mouse_enter and hide on  - *   mouse_leave events. - * - provides callback for button clicks - */ -class LLPanelWearableListItem : public LLPanelInventoryListItemBase -{ -	LOG_CLASS(LLPanelWearableListItem); -public: - -	/** -	* Shows buttons when mouse is over -	*/ -	/*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask); - -	/** -	* Hides buttons when mouse is out -	*/ -	/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); - -protected: - -	LLPanelWearableListItem(LLViewerInventoryItem* item, const Params& params); -}; - -/** - * @class LLPanelWearableOutfitItem - * - * Outfit item for "My Outfits" list. - * Extends LLPanelInventoryListItemBase with handling - * double click to wear the item. - */ -class LLPanelWearableOutfitItem : public LLPanelInventoryListItemBase -{ -	LOG_CLASS(LLPanelWearableOutfitItem); -public: -	static LLPanelWearableOutfitItem* create(LLViewerInventoryItem* item, -											 bool worn_indication_enabled); - -	/** -	 * Updates item name and (worn) suffix. -	 */ -	/*virtual*/ void updateItem(const std::string& name, -								EItemState item_state = IS_DEFAULT); - -protected: -	LLPanelWearableOutfitItem(LLViewerInventoryItem* item, -							  bool worn_indication_enabled, const Params& params); - -private: -	bool	mWornIndicationEnabled; -}; - -class LLPanelDeletableWearableListItem : public LLPanelWearableListItem -{ -	LOG_CLASS(LLPanelDeletableWearableListItem); -public: -	struct Params : public LLInitParam::Block<Params, LLPanelWearableListItem::Params> -	{ -		Optional<LLButton::Params>		delete_btn; - -		Params(); -	}; - - -	static LLPanelDeletableWearableListItem* create(LLViewerInventoryItem* item); - -	virtual ~LLPanelDeletableWearableListItem() {}; - -	/*virtual*/ BOOL postBuild(); - -	/** -	 * Make button visible during mouse over event. -	 */ -	inline void setShowDeleteButton(bool show) { setShowWidget("btn_delete", show); } - -protected: -	LLPanelDeletableWearableListItem(LLViewerInventoryItem* item, const Params& params); -}; - -/** Outfit list item for an attachment */ -class LLPanelAttachmentListItem : public LLPanelDeletableWearableListItem -{ -	LOG_CLASS(LLPanelAttachmentListItem); -public: -	static LLPanelAttachmentListItem* create(LLViewerInventoryItem* item); -	virtual ~LLPanelAttachmentListItem() {}; - -	/** Set item title. Joint name is added to the title in parenthesis */ -	/*virtual*/ void updateItem(const std::string& name, -								EItemState item_state = IS_DEFAULT); - -protected: -	LLPanelAttachmentListItem(LLViewerInventoryItem* item, const Params& params) : LLPanelDeletableWearableListItem(item, params) {}; -}; - -/** - * @class LLPanelClothingListItem - * - * Provides buttons for editing, moving, deleting a wearable. - */ -class LLPanelClothingListItem : public LLPanelDeletableWearableListItem -{ -	LOG_CLASS(LLPanelClothingListItem); -public: - -	struct Params : public LLInitParam::Block<Params, LLPanelDeletableWearableListItem::Params> -	{ -		Optional<LLButton::Params>		up_btn, -										down_btn, -										edit_btn; -		Optional<LLPanel::Params>		lock_panel, -										edit_panel; -		Optional<LLIconCtrl::Params>	lock_icon; - -		Params(); -	}; - -	static LLPanelClothingListItem* create(LLViewerInventoryItem* item); - -	virtual ~LLPanelClothingListItem(); - -	/*virtual*/ BOOL postBuild(); - -	/** -	 * Make button visible during mouse over event. -	 */ -	inline void setShowMoveUpButton(bool show) { setShowWidget("btn_move_up", show); } - -	inline void setShowMoveDownButton(bool show) { setShowWidget("btn_move_down", show); } -	inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } -	inline void setShowEditButton(bool show) { setShowWidget("btn_edit_panel", show); } - -protected: - -	LLPanelClothingListItem(LLViewerInventoryItem* item, const Params& params); - -}; - -class LLPanelBodyPartsListItem : public LLPanelWearableListItem -{ -	LOG_CLASS(LLPanelBodyPartsListItem); -public: -	struct Params : public LLInitParam::Block<Params, LLPanelWearableListItem::Params> -	{ -		Optional<LLButton::Params>		edit_btn; -		Optional<LLPanel::Params>		lock_panel, -										edit_panel; -		Optional<LLIconCtrl::Params>	lock_icon; - -		Params(); -	}; - -	static LLPanelBodyPartsListItem* create(LLViewerInventoryItem* item); - -	virtual ~LLPanelBodyPartsListItem(); - -	/*virtual*/ BOOL postBuild(); - -	/** -	* Make button visible during mouse over event. -	*/ -	inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } -	inline void setShowEditButton(bool show) { setShowWidget("btn_edit_panel", show); } - -protected: -	LLPanelBodyPartsListItem(LLViewerInventoryItem* item, const Params& params); -}; - - -/** - * @class LLPanelDummyClothingListItem - * - * A dummy item panel - displays grayed clothing icon, grayed title '<clothing> not worn' and 'add' button - */ -class LLPanelDummyClothingListItem : public LLPanelWearableListItem -{ -public: -	struct Params : public LLInitParam::Block<Params, LLPanelWearableListItem::Params> -	{ -		Optional<LLPanel::Params> add_panel; -		Optional<LLButton::Params> add_btn; -		Params(); -	}; -	static LLPanelDummyClothingListItem* create(LLWearableType::EType w_type); - -	/*virtual*/ BOOL postBuild(); -	LLWearableType::EType getWearableType() const; - -protected: -	LLPanelDummyClothingListItem(LLWearableType::EType w_type, const Params& params); - -	static std::string wearableTypeToString(LLWearableType::EType w_type); - -private: -	LLWearableType::EType mWearableType; -}; - -/** - * @class LLWearableListItemComparator - * - * Abstract comparator of wearable list items. - */ -class LLWearableListItemComparator : public LLFlatListView::ItemComparator -{ -	LOG_CLASS(LLWearableListItemComparator); - -public: -	LLWearableListItemComparator() {}; -	virtual ~LLWearableListItemComparator() {}; - -	virtual bool compare(const LLPanel* item1, const LLPanel* item2) const -	{ -		const LLPanelInventoryListItemBase* wearable_item1 = dynamic_cast<const LLPanelInventoryListItemBase*>(item1); -		const LLPanelInventoryListItemBase* wearable_item2 = dynamic_cast<const LLPanelInventoryListItemBase*>(item2); - -		if (!wearable_item1 || !wearable_item2) -		{ -			llwarning("item1 and item2 cannot be null", 0); -			return true; -		} - -		return doCompare(wearable_item1, wearable_item2); -	} - -protected: - -	/** -	 * Returns true if wearable_item1 < wearable_item2, false otherwise -	 * Implement this method in your particular comparator. -	 */ -	virtual bool doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const = 0; -}; - -/** - * @class LLWearableItemNameComparator - * - * Comparator for sorting wearable list items by name. - */ -class LLWearableItemNameComparator : public LLWearableListItemComparator -{ -	LOG_CLASS(LLWearableItemNameComparator); - -public: -	LLWearableItemNameComparator() {}; -	virtual ~LLWearableItemNameComparator() {}; - -protected: -	/*virtual*/ bool doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const; -}; - -/** - * @class LLWearableItemTypeNameComparator - * - * Comparator for sorting wearable list items by type and name. - */ -class LLWearableItemTypeNameComparator : public LLWearableItemNameComparator -{ -	LOG_CLASS(LLWearableItemTypeNameComparator); - -public: - -	LLWearableItemTypeNameComparator(); -	virtual ~LLWearableItemTypeNameComparator() {}; - -	enum ETypeListOrder -	{ -		ORDER_RANK_1 = 1, -		ORDER_RANK_2, -		ORDER_RANK_3, -		ORDER_RANK_UNKNOWN -	}; - -	void setOrder(LLAssetType::EType items_of_type, ETypeListOrder order_priority, bool sort_items_by_name, bool sort_wearable_items_by_name); - -protected: -	/** -	 * All information about sort order is stored in mWearableOrder map -	 * -	 * mWearableOrder :      KYES              VALUES -	 *                  [LLAssetType] [struct LLWearableTypeOrder] -	 * -	 *--------------------------------------------------------------------------------------------- -	 * I. Determines order (ORDER_RANK) in which items of LLAssetType should be displayed in list. -	 *     For example by spec in MY OUTFITS the order is: -	 *     1. AT_CLOTHING (ORDER_RANK_1) -	 *     2. AT_OBJECT   (ORDER_RANK_2) -	 *     3. AT_BODYPART (ORDER_RANK_3) -	 * -	 * II.Items of each type(LLAssetType) are sorted by name or type(LLWearableType) -	 *     For example by spec in MY OUTFITS the order within each items type(LLAssetType) is: -	 *     1. AT_OBJECTS (abc order) -	 *     2. AT_CLOTHINGS -	 *       - by type (types order determined in LLWearableType::EType) -	 *       - outer layer on top -	 *     3. AT_BODYPARTS  (abc order) -	 *--------------------------------------------------------------------------------------------- -	 * -	 * For each LLAssetType (KEYS in mWearableOrder) the information about: -	 * -	 *                                             I.  ORDER_RANK (the flag is LLWearableTypeOrder::mOrderPriority) -	 * -	 *                                             II. whether items of this LLAssetType type should be ordered -	 *                                                 by name or by LLWearableType::EType (the flag is LLWearableTypeOrder::mSortAssetTypeByName) -	 * -	 *                                             III.whether items of LLWearableType type within this LLAssetType -	 *                                                 should be ordered by name (the flag is LLWearableTypeOrder::mSortWearableTypeByName) -	 * -	 *  holds in mWearableOrder map as VALUES (struct LLWearableTypeOrder). -	 */ -	/*virtual*/ bool doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const; - -private: - -	struct LLWearableTypeOrder -	{ -		ETypeListOrder mOrderPriority; -		bool mSortAssetTypeByName; -		bool mSortWearableTypeByName; - -		LLWearableTypeOrder(ETypeListOrder order_priority, bool sort_asset_by_name, bool sort_wearable_by_name); -		LLWearableTypeOrder(){}; -	}; - -	ETypeListOrder getTypeListOrder(LLAssetType::EType item_type) const; - -	bool sortAssetTypeByName(LLAssetType::EType item_type) const; -	bool sortWearableTypeByName(LLAssetType::EType item_type) const; - -	typedef std::map<LLAssetType::EType,LLWearableTypeOrder> wearable_type_order_map_t; -	wearable_type_order_map_t mWearableOrder; -};  /**   * @class LLWearableItemsList @@ -384,71 +47,19 @@ private:   */  class LLWearableItemsList : public LLInventoryItemsList  { -	LOG_CLASS(LLWearableItemsList);  public: -	/** -	 * Context menu. -	 *  -	 * This menu is likely to be used from outside -	 * (e.g. for items selected across multiple wearable lists), -	 * so making it a singleton. -	 */ -	class ContextMenu : public LLListContextMenu, public LLSingleton<ContextMenu> -	{ -	public: -		ContextMenu(); -		/*virtual*/ void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y); - -	protected: -		enum { -			MASK_CLOTHING		= 0x01, -			MASK_BODYPART		= 0x02, -			MASK_ATTACHMENT		= 0x04, -			MASK_UNKNOWN		= 0x08, -		}; - -		/* virtual */ LLContextMenu* createMenu(); -		void updateItemsVisibility(LLContextMenu* menu); -		void updateItemsLabels(LLContextMenu* menu); -		static void setMenuItemVisible(LLContextMenu* menu, const std::string& name, bool val); -		static void setMenuItemEnabled(LLContextMenu* menu, const std::string& name, bool val); -		static void updateMask(U32& mask, LLAssetType::EType at); -		static void createNewWearable(const LLUUID& item_id); -		static bool canAddWearable(const LLUUID& item_id); - -		LLWearableItemsList*	mParent; -	}; -  	struct Params : public LLInitParam::Block<Params, LLInventoryItemsList::Params>  	{ -		Optional<bool> standalone; -		Optional<bool> worn_indication_enabled; -  		Params();  	};  	virtual ~LLWearableItemsList(); -	/*virtual*/ void addNewItem(LLViewerInventoryItem* item, bool rearrange = true); -  	void updateList(const LLUUID& category_id); -	/** -	 * Update items that match UUIDs from changed_items_uuids -	 * or links that point at such items. -	 */ -	void updateChangedItems(const LLInventoryModel::changed_items_t& changed_items_uuids); - -	bool isStandalone() const { return mIsStandalone; } -  protected:  	friend class LLUICtrlFactory;  	LLWearableItemsList(const LLWearableItemsList::Params& p); - -	void onRightClick(S32 x, S32 y); - -	bool mIsStandalone; -	bool mWornIndicationEnabled;  };  #endif //LL_LLWEARABLEITEMSLIST_H diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index ddbcdfc3f7..20266706da 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -2,25 +2,31 @@   * @file llwearablelist.cpp   * @brief LLWearableList class implementation   * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2002&license=viewergpl$ + *  + * Copyright (c) 2002-2009, 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. + * 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   *  - * 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. + * 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   *  - * 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 + * 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.   *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * 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$   */ @@ -115,7 +121,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID  			bool res = wearable->importFile( fp );  			if (!res)  			{ -				if (wearable->getType() == LLWearableType::WT_COUNT) +				if (wearable->getType() == WT_COUNT)  				{  					isNewWearable = TRUE;  				} @@ -222,14 +228,14 @@ LLWearable* LLWearableList::createCopy(const LLWearable* old_wearable, const std  	return wearable;  } -LLWearable* LLWearableList::createNewWearable( LLWearableType::EType type ) +LLWearable* LLWearableList::createNewWearable( EWearableType type )  {  	lldebugs << "LLWearableList::createNewWearable()" << llendl;  	LLWearable *wearable = generateNewWearable();  	wearable->setType( type ); -	std::string name = LLTrans::getString( LLWearableType::getTypeDefaultNewName(wearable->getType()) ); +	std::string name = LLTrans::getString( LLWearableDictionary::getTypeDefaultNewName(wearable->getType()) );  	wearable->setName( name );  	LLPermissions perm; diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 151180aae7..081a3721b1 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1072,18 +1072,10 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, MASK mask )  			// zoomed out, so don't display anything about the count. JC  			if (agent_count > 0)  			{ -				// Merov: i18n horror!!! Even using gettext(), concatenating strings is not localizable.  -				// The singular/plural switch form here under might make no sense in some languages. Don't do that. -				message += llformat("\n%d ", agent_count); - -				if (agent_count == 1) -				{ -					message += "person"; -				} -				else -				{ -					message += "people"; -				} +				LLStringUtil::format_map_t string_args; +				string_args["[NUMBER]"] = llformat("%d", agent_count); +				message += '\n'; +				message += getString((agent_count == 1 ? "world_map_person" : "world_map_people") , string_args);  			}  		}  		tooltip_msg.assign( message ); diff --git a/indra/newview/skins/default/textures/icons/Progress_1.png b/indra/newview/skins/default/textures/icons/Progress_1.png Binary files differnew file mode 100644 index 0000000000..5d6efbfa2a --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_1.png diff --git a/indra/newview/skins/default/textures/icons/Progress_10.png b/indra/newview/skins/default/textures/icons/Progress_10.png Binary files differnew file mode 100644 index 0000000000..28203324f1 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_10.png diff --git a/indra/newview/skins/default/textures/icons/Progress_11.png b/indra/newview/skins/default/textures/icons/Progress_11.png Binary files differnew file mode 100644 index 0000000000..6b87be0c3f --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_11.png diff --git a/indra/newview/skins/default/textures/icons/Progress_12.png b/indra/newview/skins/default/textures/icons/Progress_12.png Binary files differnew file mode 100644 index 0000000000..089d58b090 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_12.png diff --git a/indra/newview/skins/default/textures/icons/Progress_2.png b/indra/newview/skins/default/textures/icons/Progress_2.png Binary files differnew file mode 100644 index 0000000000..94cb73b1f7 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_2.png diff --git a/indra/newview/skins/default/textures/icons/Progress_3.png b/indra/newview/skins/default/textures/icons/Progress_3.png Binary files differnew file mode 100644 index 0000000000..a04a5b5263 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_3.png diff --git a/indra/newview/skins/default/textures/icons/Progress_4.png b/indra/newview/skins/default/textures/icons/Progress_4.png Binary files differnew file mode 100644 index 0000000000..a467098d82 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_4.png diff --git a/indra/newview/skins/default/textures/icons/Progress_5.png b/indra/newview/skins/default/textures/icons/Progress_5.png Binary files differnew file mode 100644 index 0000000000..ea64f1d907 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_5.png diff --git a/indra/newview/skins/default/textures/icons/Progress_6.png b/indra/newview/skins/default/textures/icons/Progress_6.png Binary files differnew file mode 100644 index 0000000000..fe4447935f --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_6.png diff --git a/indra/newview/skins/default/textures/icons/Progress_7.png b/indra/newview/skins/default/textures/icons/Progress_7.png Binary files differnew file mode 100644 index 0000000000..64fa294771 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_7.png diff --git a/indra/newview/skins/default/textures/icons/Progress_8.png b/indra/newview/skins/default/textures/icons/Progress_8.png Binary files differnew file mode 100644 index 0000000000..a1c9a7f2eb --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_8.png diff --git a/indra/newview/skins/default/textures/icons/Progress_9.png b/indra/newview/skins/default/textures/icons/Progress_9.png Binary files differnew file mode 100644 index 0000000000..f3e9723184 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_9.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 84a99ba92a..bbb82d86b1 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -580,4 +580,17 @@ with the same filename but different name    <texture name="default_profile_picture.j2c" />    <texture name="locked_image.j2c" /> +  <texture name="Progress_1" file_name="icons/Progress_1.png" preload="true" /> +  <texture name="Progress_2" file_name="icons/Progress_2.png" preload="true" /> +  <texture name="Progress_3" file_name="icons/Progress_3.png" preload="true" /> +  <texture name="Progress_4" file_name="icons/Progress_4.png" preload="true" /> +  <texture name="Progress_5" file_name="icons/Progress_5.png" preload="true" /> +  <texture name="Progress_6" file_name="icons/Progress_6.png" preload="true" /> +  <texture name="Progress_7" file_name="icons/Progress_7.png" preload="true" /> +  <texture name="Progress_8" file_name="icons/Progress_8.png" preload="true" /> +  <texture name="Progress_9" file_name="icons/Progress_9.png" preload="true" /> +  <texture name="Progress_10" file_name="icons/Progress_10.png" preload="true" /> +  <texture name="Progress_11" file_name="icons/Progress_11.png" preload="true" /> +  <texture name="Progress_12" file_name="icons/Progress_12.png" preload="true" /> +  </textures> diff --git a/indra/newview/skins/default/xui/de/floater_about_land.xml b/indra/newview/skins/default/xui/de/floater_about_land.xml index 5f00fc4f77..38e72dbadf 100644 --- a/indra/newview/skins/default/xui/de/floater_about_land.xml +++ b/indra/newview/skins/default/xui/de/floater_about_land.xml @@ -62,9 +62,6 @@  			<panel.string name="no_selection_text">  				Keine Parzelle ausgewählt.  			</panel.string> -			<panel.string name="time_stamp_template"> -				[wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] -			</panel.string>  			<text name="Name:">  				Name:  			</text> @@ -356,7 +353,7 @@ Nur große Parzellen können in der Suche aufgeführt werden.  				<combo_box.item label="Shopping" name="item11"/>  				<combo_box.item label="Sonstige" name="item12"/>  			</combo_box> -			<combo_box name="land category"> +			<combo_box left="266" name="land category" width="130">  				<combo_box.item label="Alle Kategorien" name="item0"/>  				<combo_box.item label="Lindenort" name="item1"/>  				<combo_box.item label="Kunst und Kultur" name="item3"/> diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 59f1889808..40c6b14a4a 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1061,7 +1061,8 @@ Leyla Linden               </text>               left="10"               name="Autoreturn"               top_pad="0" -             width="310"> +             width="412" +             wrap="true">                  Auto return other Residents' objects (minutes, 0 for off):              </text>              <line_editor @@ -1073,9 +1074,9 @@ Leyla Linden               </text>               layout="topleft"               max_length="6"               name="clean other time" -             right="-72" -             width="56" -             top_delta="-6"/> +             left_pad="0" +             width="46" +             top_delta="-2"/>              <text               type="string"               length="1" diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml index 32460e937d..01bced81d0 100644 --- a/indra/newview/skins/default/xui/en/floater_customize.xml +++ b/indra/newview/skins/default/xui/en/floater_customize.xml @@ -11,7 +11,7 @@   save_rect="true"   title="APPEARANCE"   top_delta="-185" - width="524"> + width="600">      <tab_container       height="517"       layout="topleft" @@ -21,7 +21,7 @@       tab_position="left"       tab_height="50"       top="26" -     width="506"> +     width="580">              <text               type="string"               length="1" @@ -65,15 +65,15 @@               mouse_opaque="true"               width="16" />              <button -             follows="right|bottom" +             follows="left|top"               height="23" -             label="Revert" -             label_selected="Revert" +             label="Create New Shape" +             label_selected="Create New Shape"               layout="topleft" -             right="390" -             name="Revert" -             top="477" -             width="82" /> +             left="10" +             name="Create New" +             top="104" +             width="160" />              <button               follows="left|top"               height="23" @@ -280,46 +280,46 @@               type="string"               length="1"               top="488" -             follows="left|top|right" +             follows="left|top"               font="SansSerif"               halign="right"               height="23"               layout="topleft" +             left="10"               name="Item Action Label" -             right="90" -             width="100"> +             width="130">                  Shape:              </text>              <button -             follows="left|top" -             height="23" -             label="Create New Shape" -             label_selected="Create New Shape" -             layout="topleft" -             left="10" -             name="Create New" -             top="104" -             width="160" /> -            <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft"               name="Save" -             right="186" +             left_pad="2"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft"               name="Save As"               top="477" -             right="304" +             left_pad="3"               width="115" /> +            <button +             follows="left|bottom" +             height="23" +             label="Revert" +             label_selected="Revert" +             layout="topleft" +             left_pad="3" +             name="Revert" +             top="477" +             width="120" />          </panel>          <panel           border="false" @@ -352,6 +352,16 @@              <button               follows="left|top"               height="23" +             label="Create New Skin" +             label_selected="Create New Skin" +             layout="topleft" +             left_delta="0" +             name="Create New" +             top_delta="-249" +             width="160" /> +            <button +             follows="left|top" +             height="23"               label="Skin Color"               label_selected="Skin Color"               layout="topleft" @@ -479,20 +489,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             top="488" -             follows="left|top|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="topleft" -             name="Item Action Label" -             right="90" -             width="100"> -                Skin: -            </text>              <texture_picker               allow_no_texture="true"               can_apply_immediately="true" @@ -532,46 +528,50 @@               tool_tip="Click to choose a picture"               top_delta="102"               width="82" /> -            <button +            <text +             type="string" +             length="1" +             top="488"               follows="left|top" +             font="SansSerif" +             halign="right"               height="23" -             label="Create New Skin" -             label_selected="Create New Skin"               layout="topleft" -             left_delta="0" -             name="Create New" -             top_delta="-249" -             width="160" /> +             left="10" +             name="Item Action Label" +             width="130"> +                Skin: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />          </panel>          <panel           border="false" @@ -729,20 +729,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             top="488" -             follows="left|top|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="topleft" -             name="Item Action Label" -             right="90"  -             width="100"> -                Hair: -            </text>              <texture_picker               can_apply_immediately="true"               default_image_name="Default" @@ -765,36 +751,50 @@               name="Create New"               top_delta="-89"               width="160" /> +            <text +             type="string" +             length="1" +             top="488" +             follows="left|top" +             font="SansSerif" +             halign="right" +             height="23" +             layout="topleft" +             name="Item Action Label" +             left="10" +             width="130"> +                Hair: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />          </panel>          <panel           border="false" @@ -914,20 +914,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             bottom="4" -             follows="left|bottom|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="bottomleft" -             name="Item Action Label" -             right="90"  -             width="100"> -                Eyes: -            </text>              <texture_picker               can_apply_immediately="true"               default_image_name="Default" @@ -949,36 +935,50 @@               name="Create New"               top="66"               width="160" /> +            <text +             type="string" +             length="1" +             bottom="4" +             follows="left|bottom" +             font="SansSerif" +             halign="right" +             height="23" +             layout="bottomleft" +             name="Item Action Label" +             left="10" +             width="130"> +                Eyes: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />          </panel>              <text               type="string" @@ -1063,36 +1063,50 @@               name="Create New"               top="66"               width="160" /> +            <text +             type="string" +             length="1" +             bottom="4" +             follows="left|bottom" +             font="SansSerif" +             halign="right" +             height="23" +             layout="bottomleft" +             name="Item Action Label" +             left="10" +             width="130"> +                Shirt: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />              <text               type="string"               length="1" @@ -1183,20 +1197,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             bottom="4" -             follows="left|bottom|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="bottomleft" -             name="Item Action Label" -             right="90"  -             width="100"> -                Shirt: -            </text>          </panel>          <panel           border="false" @@ -1266,36 +1266,50 @@               name="Create New"               top="66"               width="160" /> +            <text +             type="string" +             length="1" +             bottom="4" +             follows="left|bottom" +             font="SansSerif" +             halign="right" +             height="23" +             layout="bottomleft" +             name="Item Action Label" +             left="10" +             width="130"> +                Pants: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />              <text               type="string"               length="1" @@ -1386,20 +1400,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             bottom="4" -             follows="left|bottom|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="bottomleft" -             name="Item Action Label" -             right="90"  -             width="100"> -                Pants: -            </text>          </panel>          <panel           border="false" @@ -1528,20 +1528,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             bottom="4" -             follows="left|bottom|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="bottomleft" -             name="Item Action Label" -             right="90"  -             width="100"> -                Shoes: -            </text>              <texture_picker               can_apply_immediately="true"               default_image_name="Default" @@ -1573,36 +1559,50 @@               name="Take Off"               top_pad="4"               width="82" /> +            <text +             type="string" +             length="1" +             bottom="4" +             follows="left|bottom" +             font="SansSerif" +             halign="right" +             height="23" +             layout="bottomleft" +             left="10" +             name="Item Action Label" +             width="130"> +                Shoes: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />          </panel>          <panel           border="false" @@ -1731,20 +1731,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             bottom="4" -             follows="left|bottom|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="bottomleft" -             name="Item Action Label" -             right="90"  -             width="100"> -                Socks: -            </text>              <texture_picker               can_apply_immediately="true"               default_image_name="Default" @@ -1776,36 +1762,50 @@               name="Take Off"               top_pad="4"               width="82" /> +            <text +             type="string" +             length="1" +             bottom="4" +             follows="left|bottom" +             font="SansSerif" +             halign="right" +             height="23" +             layout="bottomleft" +             left="10" +             name="Item Action Label" +             width="130"> +                Socks: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />          </panel>          <panel           border="false" @@ -1934,20 +1934,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             bottom="4" -             follows="left|bottom|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="bottomleft" -             name="Item Action Label" -             right="90"  -             width="100"> -                Jacket: -            </text>              <texture_picker               can_apply_immediately="true"               default_image_name="Default" @@ -1990,36 +1976,50 @@               name="Take Off"               top_pad="4"               width="82" /> +            <text +             type="string" +             length="1" +             bottom="4" +             follows="left|bottom" +             font="SansSerif" +             halign="right" +             height="23" +             layout="bottomleft" +             left="10" +             name="Item Action Label" +             width="130"> +                Jacket: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />          </panel>          <panel           border="false" @@ -2148,20 +2148,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             bottom="4" -             follows="left|bottom|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="bottomleft" -             name="Item Action Label" -             right="90"  -             width="100"> -                Gloves: -            </text>              <texture_picker               can_apply_immediately="true"               default_image_name="Default" @@ -2193,36 +2179,50 @@               name="Take Off"               top_pad="4"               width="82" /> +            <text +             type="string" +             length="1" +             bottom="4" +             follows="left|bottom" +             font="SansSerif" +             halign="right" +             height="23" +             layout="bottomleft" +             left="10" +             name="Item Action Label" +             width="130"> +                Gloves: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />          </panel>          <panel           border="false" @@ -2351,20 +2351,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             bottom="4" -             follows="left|bottom|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="bottomleft" -             name="Item Action Label" -             right="90"  -             width="100"> -                Undershirt: -            </text>              <texture_picker               can_apply_immediately="true"               default_image_name="Default" @@ -2396,36 +2382,50 @@               name="Take Off"               top_pad="4"               width="82" /> +            <text +             type="string" +             length="1" +             bottom="4" +             follows="left|bottom" +             font="SansSerif" +             halign="right" +             height="23" +             layout="bottomleft" +             left="10" +             name="Item Action Label" +             width="130"> +                Undershirt: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />          </panel>          <panel           border="false" @@ -2554,20 +2554,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             bottom="4" -             follows="left|bottom|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="bottomleft" -             name="Item Action Label" -             right="90"  -             width="100"> -                Underpants: -            </text>              <texture_picker               can_apply_immediately="true"               default_image_name="Default" @@ -2599,36 +2585,50 @@               name="Take Off"               top_pad="4"               width="82" /> +            <text +             type="string" +             length="1" +             bottom="4" +             follows="left|bottom" +             font="SansSerif" +             halign="right" +             height="23" +             layout="bottomleft" +             left="10" +             name="Item Action Label" +             width="130"> +                Underpants: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />          </panel>          <panel           border="false" @@ -2757,20 +2757,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             bottom="4" -             follows="left|bottom|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="bottomleft" -             name="Item Action Label" -             right="90"  -             width="100"> -                Skirt: -            </text>              <texture_picker               can_apply_immediately="true"               default_image_name="Default" @@ -2802,36 +2788,50 @@               name="Take Off"               top_pad="4"               width="82" /> +            <text +             type="string" +             length="1" +             bottom="4" +             follows="left|bottom" +             font="SansSerif" +             halign="right" +             height="23" +             layout="bottomleft" +             left="10" +             name="Item Action Label" +             width="130"> +                Skirt: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />          </panel>          <panel           border="false" @@ -2960,20 +2960,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             bottom="4" -             follows="left|bottom|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="bottomleft" -             name="Item Action Label" -             right="90"  -             width="100"> -                Tattoo: -            </text>              <texture_picker               can_apply_immediately="true"               default_image_name="Default" @@ -3018,36 +3004,50 @@               top_pad="4"               left="10"               width="82" /> +            <text +             type="string" +             length="1" +             bottom="4" +             follows="left|bottom" +             font="SansSerif" +             halign="right" +             height="23" +             layout="bottomleft" +             left="10" +             name="Item Action Label" +             width="130"> +                Tattoo: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />          </panel>          <panel           border="false" @@ -3176,20 +3176,6 @@               width="373">                  You do not have permission to modify this wearable.              </text> -            <text -             type="string" -             length="1" -             bottom="4" -             follows="left|bottom|right" -             font="SansSerif" -             halign="right" -             height="23" -             layout="bottomleft" -             name="Item Action Label" -             right="90"  -             width="100"> -                Alpha: -            </text>              <texture_picker               can_apply_immediately="true"               default_image_name="Default" @@ -3299,47 +3285,61 @@               left="10"               top_pad="20"               width="82" /> +            <text +             type="string" +             length="1" +             bottom="4" +             follows="left|bottom" +             font="SansSerif" +             halign="right" +             height="23" +             layout="bottomleft" +             left="10" +             name="Item Action Label" +             width="130"> +                Alpha: +            </text>              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save"               label_selected="Save"               layout="topleft" -             right="186" +             left_pad="2"               name="Save"               top="477"               width="82" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Save As..."               label_selected="Save As..."               layout="topleft" -             right="304" +             left_pad="3"               name="Save As"               top="477"               width="115" />              <button -             follows="right|bottom" +             follows="left|bottom"               height="23"               label="Revert"               label_selected="Revert"               layout="topleft" -             right="390" +             left_pad="3"               name="Revert"               top="477" -             width="82" /> +             width="120" />          </panel>      </tab_container>      <scroll_container       follows="left|top|right|bottom"       height="409"       layout="topleft" -     left="211" +     left="247"       mouse_opaque="false"       name="panel_container"       top="92" -     width="292"> +     width="330">          <scrolling_panel_list           follows="left|bottom"           layout="topleft" @@ -3355,7 +3355,7 @@       name="script_info"       tool_tip="Show scripts attached to your avatar"       left="13" -     width="90" /> +     width="90" ></button>      <button       bottom="574"       follows="right|bottom" diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml index 65a05f3ec5..ced8c29199 100644 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -11,7 +11,7 @@   save_visibility="true"   single_instance="true"   title="CONVERSATIONS" - width="392"> + width="396">      <tab_container       follows="left|right|top|bottom"       height="390" @@ -27,7 +27,7 @@       halign="left"       use_ellipses="true"       top="0" -     width="390" /> +     width="394" />      <icon       color="DefaultShadowLight"       enabled="false" @@ -38,5 +38,5 @@       left="1"       name="im_box_tab_container_icon"       bottom="10" -     width="390" /> +     width="394" />  </multi_floater> diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index c9b013099b..f537c81860 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -33,6 +33,7 @@        name="panel_im_control_panel"        layout="topleft"        follows="left" +      label="IM Control Panel"        min_width="115"         auto_resize="false"        user_resize="true" /> diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index 5ea207675b..9db6568ee3 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -119,7 +119,7 @@ No Answer.  Please try again later.       layout="topleft"       left="77"       name="leaving" -     top="52" +     top="62"       width="315"       word_wrap="true">  Leaving [CURRENT_CHAT]. diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 50d0011338..6e82bb09ee 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -1,7 +1,8 @@  <?xml version="1.0" encoding="utf-8" standalone="yes" ?>  <floater   legacy_header_height="18" - open_centered="true" + center_horiz="true" + center_vert="true"   default_tab_group="1"   height="460"   layout="topleft" diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml index 8b10c7b049..6ca8766e3f 100644 --- a/indra/newview/skins/default/xui/en/menu_object.xml +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -18,16 +18,16 @@       name="Edit...">          <menu_item_call.on_click           function="Object.Edit" /> -        <menu_item_call.on_visible +    <menu_item_call.on_visible           function="EnableEdit"/>      </menu_item_call>      <menu_item_call        label="Build"        name="Build">        <menu_item_call.on_click -       function="Object.Edit" /> -      <menu_item_call.on_visible -       function="VisibleBuild"/> +        function="Object.Build" /> +        <menu_item_call.on_visible +         function="EnableEdit"/>      </menu_item_call>     <menu_item_call       enabled="false" diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml index 8e1e5ff062..a585069faa 100644 --- a/indra/newview/skins/default/xui/en/mime_types.xml +++ b/indra/newview/skins/default/xui/en/mime_types.xml @@ -120,7 +120,7 @@  			none  		</widgettype>  		<impl> -			media_plugin_quicktime +			media_plugin_webkit  		</impl>  	</mimetype>  	<mimetype name="none/none"> @@ -130,6 +130,9 @@  		<widgettype>  			none  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="audio/*">  		<label name="audio2_label"> @@ -160,6 +163,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">  		<label name="vnd.secondlife.qt.legacy_label"> @@ -179,6 +185,9 @@  		<widgettype>  			web  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/ogg">  		<label name="application/ogg_label"> @@ -187,6 +196,9 @@  		<widgettype>  			audio  		</widgettype> +		<impl> +			media_plugin_quicktime +		</impl>  	</mimetype>  	<mimetype name="application/pdf">  		<label name="application/pdf_label"> @@ -195,6 +207,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/postscript">  		<label name="application/postscript_label"> @@ -203,6 +218,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/rtf">  		<label name="application/rtf_label"> @@ -211,6 +229,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/smil">  		<label name="application/smil_label"> @@ -219,6 +240,9 @@  		<widgettype>  			movie  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/xhtml+xml">  		<label name="application/xhtml+xml_label"> @@ -227,6 +251,9 @@  		<widgettype>  			web  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/x-director">  		<label name="application/x-director_label"> @@ -235,6 +262,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="audio/mid">  		<label name="audio/mid_label"> diff --git a/indra/newview/skins/default/xui/en/mime_types_linux.xml b/indra/newview/skins/default/xui/en/mime_types_linux.xml index 4748c14554..e95b371d00 100644 --- a/indra/newview/skins/default/xui/en/mime_types_linux.xml +++ b/indra/newview/skins/default/xui/en/mime_types_linux.xml @@ -120,7 +120,7 @@  			none  		</widgettype>  		<impl> -			media_plugin_gstreamer +			media_plugin_webkit  		</impl>  	</mimetype>  	<mimetype name="none/none"> @@ -130,6 +130,9 @@  		<widgettype>  			none  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="audio/*">  		<label name="audio2_label"> @@ -160,6 +163,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">  		<label name="vnd.secondlife.qt.legacy_label"> @@ -179,6 +185,9 @@  		<widgettype>  			web  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/ogg">  		<label name="application/ogg_label"> @@ -187,6 +196,9 @@  		<widgettype>  			audio  		</widgettype> +		<impl> +			media_plugin_gstreamer +		</impl>  	</mimetype>  	<mimetype name="application/pdf">  		<label name="application/pdf_label"> @@ -195,6 +207,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/postscript">  		<label name="application/postscript_label"> @@ -203,6 +218,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/rtf">  		<label name="application/rtf_label"> @@ -211,6 +229,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/smil">  		<label name="application/smil_label"> @@ -219,6 +240,9 @@  		<widgettype>  			movie  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/xhtml+xml">  		<label name="application/xhtml+xml_label"> @@ -227,6 +251,9 @@  		<widgettype>  			web  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/x-director">  		<label name="application/x-director_label"> @@ -235,6 +262,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="audio/mid">  		<label name="audio/mid_label"> diff --git a/indra/newview/skins/default/xui/en/mime_types_mac.xml b/indra/newview/skins/default/xui/en/mime_types_mac.xml index 8e1e5ff062..7931e55c0a 100644 --- a/indra/newview/skins/default/xui/en/mime_types_mac.xml +++ b/indra/newview/skins/default/xui/en/mime_types_mac.xml @@ -130,6 +130,9 @@  		<widgettype>  			none  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="audio/*">  		<label name="audio2_label"> @@ -160,6 +163,9 @@  		<widgettype>  			image  		</widgettype> +        <impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">  		<label name="vnd.secondlife.qt.legacy_label"> @@ -179,6 +185,9 @@  		<widgettype>  			web  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/ogg">  		<label name="application/ogg_label"> @@ -187,6 +196,9 @@  		<widgettype>  			audio  		</widgettype> +		<impl> +			media_plugin_quicktime +		</impl>  	</mimetype>  	<mimetype name="application/pdf">  		<label name="application/pdf_label"> @@ -195,6 +207,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/postscript">  		<label name="application/postscript_label"> @@ -203,6 +218,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/rtf">  		<label name="application/rtf_label"> @@ -211,6 +229,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/smil">  		<label name="application/smil_label"> @@ -219,6 +240,9 @@  		<widgettype>  			movie  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/xhtml+xml">  		<label name="application/xhtml+xml_label"> @@ -227,6 +251,9 @@  		<widgettype>  			web  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="application/x-director">  		<label name="application/x-director_label"> @@ -235,6 +262,9 @@  		<widgettype>  			image  		</widgettype> +		<impl> +			media_plugin_webkit +		</impl>  	</mimetype>  	<mimetype name="audio/mid">  		<label name="audio/mid_label"> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 07304eb14e..4479a3dd4d 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5066,6 +5066,7 @@ No valid parcel could be found.    <notification     icon="notify.tga"     name="ObjectGiveItem" +   persist="true"     type="offer">  An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJECTTYPE]:  [ITEM_SLURL] @@ -5110,6 +5111,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th    <notification     icon="notify.tga"     name="UserGiveItem" +   persist="true"     type="offer">  [NAME_SLURL] has given you this [OBJECTTYPE]:  [ITEM_SLURL] @@ -5162,10 +5164,11 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th    <notification     icon="notify.tga"     name="TeleportOffered" +   persist="true"     type="offer">  [NAME_SLURL] has offered to teleport you to their location: -[MESSAGE], ([MATURITY]) +[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon>      <form name="form">        <button         index="0" @@ -5207,6 +5210,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th    <notification     icon="notify.tga"     name="OfferFriendship" +   persist="true"     type="offer">  [NAME_SLURL] is offering friendship. diff --git a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml index 06bd1e9ff4..5fcc9b012b 100644 --- a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml +++ b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml @@ -3,12 +3,11 @@  <!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtime-->  <!-- Non of string values of controls below are visible to user. They are not need to be translated. -->  <accordion_tab - expanded="false" + display_children="false"   follows="all"   height="45"   layout="topleft"   name="Mockup Tab" - selection_enabled="true"   title="Mockup Tab"   translate="false"   width="0"> @@ -16,9 +15,7 @@       allow_select="true"       follows="all"       keep_one_selected="true" -     multi_select="true"       name="wearable_items_list"       translate="false" -     standalone="false"      />  </accordion_tab> diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml index f438e3d42d..01c7ae61d2 100644 --- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml +++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml @@ -3,59 +3,49 @@   background_visible="true"   bg_alpha_color="DkGray"   border="false" + bottom="0"   follows="all"   height="200"   left="0"   name="cof_wearables" - width="311"> + width="313">      <accordion -     fit_parent="true"       follows="all" -     height="198" +     height="373"       layout="topleft" -     left="0" -     single_expansion="true" +     left="3"       top="0"       name="cof_wearables_accordion"       background_visible="true"       bg_alpha_color="DkGray2" -     width="311"> +     width="307">          <accordion_tab           layout="topleft" -         name="tab_clothing" -         title="Clothing"> +         name="tab_attachments" +         title="Attachments">              <flat_list_view               allow_select="true"               follows="all" -             height="10" -             item_pad="3" -             keep_selection_visible_on_reshape="true" +             height="150"               layout="topleft"               left="0" -             multi_select="true" -             name="list_clothing" +             name="list_attachments"               top="0" -             width="311" /> +             width="307" />          </accordion_tab>          <accordion_tab           layout="topleft" -         name="tab_attachments" -         title="Attachments"> +         name="tab_clothing" +         title="Clothing">              <flat_list_view               allow_select="true"               follows="all" -             height="10" -             item_pad="3" +             height="150"               layout="topleft"               left="0" -             keep_selection_visible_on_reshape="true" -             multi_select="true" -             name="list_attachments" +             name="list_clothing"               top="0" -             width="311"> -              <flat_list_view.no_items_text -               value="No attachments worn" /> -              </flat_list_view> +             width="307" />          </accordion_tab>          <accordion_tab           layout="topleft" @@ -64,15 +54,12 @@              <flat_list_view               allow_select="true"               follows="all" -             height="10" -             item_pad="3" -             keep_selection_visible_on_reshape="true" +             height="150"               layout="topleft"               left="0" -             multi_select="true"               name="list_body_parts"               top="0" -             width="311" /> +             width="307" />          </accordion_tab>      </accordion>  </panel> diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml index 9e99a8ceaf..76f7484c68 100644 --- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml @@ -17,6 +17,10 @@          You don't have permission to view group owned land      </panel.string>      <panel.string +     name="epmty_view_group_land_text"> +        No entries +    </panel.string> +    <panel.string       name="cant_view_group_accounting_text">          You don't have permission to view the group's accounting information.      </panel.string> diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml index 29c6a17c31..33a5e01e4c 100644 --- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml @@ -3,14 +3,14 @@   border="false"   height="300"   name="panel_im_control_panel" - width="110"> + width="119">      <avatar_icon       follows="left|top"       height="105"       left_delta="5"       name="avatar_icon"       top="-5" -     width="105"/> +     width="114"/>      <layout_stack       mouse_opaque="false"       border_size="0" @@ -22,7 +22,7 @@       name="button_stack"       orientation="vertical"       top_pad="5" -     width="105"> +     width="114">          <layout_panel           mouse_opaque="false"           auto_resize="true" @@ -31,7 +31,7 @@           layout="topleft"           left="2"           min_height="0" -         width="100" +         width="109"           top="0"           name="spacer"           user_resize="false" /> @@ -41,7 +41,7 @@           height="20"           layout="topleft"           min_height="20" -         width="100" +         width="109"           name="view_profile_btn_panel"           user_resize="false">              <button @@ -50,7 +50,7 @@               label="Profile"               name="view_profile_btn"               top="0" -             width="100" /> +             width="109" />          </layout_panel>          <layout_panel           auto_resize="false" @@ -58,7 +58,7 @@           height="25"           layout="topleft"           min_height="25" -         width="100" +         width="109"           name="add_friend_btn_panel"           user_resize="false">              <button @@ -67,7 +67,7 @@               label="Add Friend"               name="add_friend_btn"               top="5" -             width="100" /> +             width="109" />          </layout_panel>          <layout_panel           auto_resize="false" @@ -75,7 +75,7 @@           height="25"           layout="topleft"           min_height="25" -         width="100" +         width="109"           name="teleport_btn_panel"           user_resize="false">          <button @@ -85,7 +85,7 @@               label="Teleport"               name="teleport_btn"               tool_tip = "Offer to teleport this person" -             width="100" /> +             width="109" />          </layout_panel>          <layout_panel           auto_resize="false" @@ -93,7 +93,7 @@           height="25"           layout="topleft"           min_height="25" -         width="100" +         width="109"           name="share_btn_panel"           user_resize="false">             <button @@ -102,7 +102,7 @@               height="23"               label="Share"               name="share_btn" -             width="100" /> +             width="109" />          </layout_panel>          <layout_panel           auto_resize="false" @@ -110,7 +110,7 @@           height="25"           layout="topleft"           min_height="25" -         width="100" +         width="109"           name="pay_btn_panel"           user_resize="false">             <button @@ -119,7 +119,7 @@               height="23"               label="Pay"               name="pay_btn" -             width="100" /> +             width="109" />          </layout_panel>          <layout_panel           auto_resize="false" @@ -127,7 +127,7 @@           height="25"           layout="topleft"           min_height="25" -         width="100" +         width="109"           name="call_btn_panel"           user_resize="false">              <button @@ -135,7 +135,7 @@               height="23"               label="Call"               name="call_btn" -             width="100" /> +             width="109" />          </layout_panel>          <layout_panel           auto_resize="false" @@ -143,7 +143,7 @@           height="25"           layout="topleft"           min_height="25" -         width="100" +         width="109"           name="end_call_btn_panel"           user_resize="false"           visible="false"> @@ -152,7 +152,7 @@               height="23"               label="End Call"               name="end_call_btn" -             width="100" /> +             width="109" />          </layout_panel>          <layout_panel           auto_resize="false" @@ -160,7 +160,7 @@           height="25"           layout="topleft"           min_height="25" -         width="100" +         width="109"           name="voice_ctrls_btn_panel"           user_resize="false"           visible="false"> @@ -169,7 +169,7 @@               height="23"               label="Voice Controls"               name="voice_ctrls_btn" -             width="100" /> +             width="109" />          </layout_panel>      </layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml index 5e41d65720..841a4f5713 100644 --- a/indra/newview/skins/default/xui/en/panel_my_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml @@ -401,14 +401,6 @@           name="edit_profile_btn"           tool_tip="Edit your personal information"           width="152" /> -        <button -         follows="bottom|right" -         height="23" -         label="Edit Appearance" -         left_pad="3" -         name="edit_appearance_btn" -         tool_tip="Create/edit your appearance: physical data, clothes and etc." -         width="153" />   </layout_panel>  </layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml index 184ea54fcb..5dbd8bfe6a 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml @@ -17,7 +17,7 @@       layout="topleft"       left_delta="3"       left="0" -     max_length="512" +     max_length="1024"       name="chat_box"       text_pad_left="5"       text_pad_right="25" diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml index ff2aae645b..f5a78fc929 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -7,7 +7,7 @@    background_opaque="true"  	background_visible="true"  	layout="topleft" -	width="270" +	width="328"  	height="230"  	name="nearby_media"  	help_topic="nearby_media"> @@ -29,7 +29,7 @@  		follows="left"  		tool_tip="Turn all nearby media off"  		left="8" -		width="66" +		width="95"  		height="22"  		label="Stop All">  	  <button.commit_callback @@ -40,7 +40,7 @@  		follows="left"  		tool_tip="Turn all nearby media on"  		left_pad="4" -		width="66" +		width="95"  		height="22"  		label="Start All">  	  <button.commit_callback diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index c77e4e8d5e..73181392c9 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -149,29 +149,18 @@           auto_resize="true"           user_resize="true"> -            <scroll_list -             width="300" -             column_padding="0" -             draw_heading="false" -             draw_stripes="false" +            <!-- List containing items from the COF and Base outfit --> +            <panel +             background_visible="false" +             class="cof_wearables" +             filename="panel_cof_wearables.xml"               follows="left|top|right|bottom" +             height="193"               layout="topleft" -             name="look_items_list" -             search_column="1" -             sort_column="2"               left="0" -             height="193" -             top="0"> -                <scroll_list.columns -                 label="Look Item" -                 name="look_item" -                 width="285" /> -                <scroll_list.columns -                 label="Outfit Item Sort" -                 width="0" -                 sort_column="look_item_sort" -                 name="look_item_sort" /> -            </scroll_list> +             name="cof_wearables_list" +             top="0" +             width="300" />             <panel               background_visible="true" @@ -222,6 +211,30 @@                   top="1"                   width="31" />                  <button +                 follows="bottom|left" +                 height="25" +                 image_hover_unselected="Toolbar_Middle_Over" +                 image_overlay="Movement_Forward_On" +                 image_selected="Toolbar_Middle_Selected" +                 image_unselected="Toolbar_Middle_Off" +                 layout="topleft" +                 left_pad="1" +                 name="move_closer_btn" +                 top="1" +                 width="31" /> +                <button +                 follows="bottom|left" +                 height="25" +                 image_hover_unselected="Toolbar_Middle_Over" +                 image_overlay="Movement_Backward_On" +                 image_selected="Toolbar_Middle_Selected" +                 image_unselected="Toolbar_Middle_Off" +                 layout="topleft" +                 left_pad="1" +                 name="move_further_btn" +                 top="1" +                 width="31" /> +                <button                   follows="bottom|right"                   height="25"                   image_hover_unselected="Toolbar_Middle_Over" @@ -342,6 +355,30 @@               width="300"/>              <panel +             name="filtered_wearables_panel" +             background_opaque="true" +             background_visible="true" +             layout="topleft" +             follows="left|top|right|bottom" +             border="false" +             height="155" +             left="0" +             mouse_opaque="false" +             width="300" +             top_delta="0" +             visible="false"> +             <wearable_items_list +              name="filtered_wearables_list" +              allow_select="true" +              layout="topleft" +              follows="all" +              width="300" +              height="155" +              left="0" +              top="0" /> +            </panel> + +            <panel               background_visible="true"               bevel_style="none"               follows="left|right|bottom" diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index 66ed43efec..b8ad278da7 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -23,20 +23,16 @@       tab_position="top"       halign="center"       width="312"> -         <inventory_panel +         <panel +           class="outfits_list" +           filename="panel_outfits_list.xml" +           height="490" +           name="outfitslist_tab"             background_visible="true" -           background_opaque="true" -           label="MY OUTFITS" -           help_topic="my_outfits_tab" -           allow_multi_select="true"             follows="all" -           border="false" -           left="0" -           top="0" -           width="315" -           mouse_opaque="true" -           name="outfitslist_tab" -           start_folder="My Outfits" />  +           label="MY OUTFITS" +           layout="topleft" +           width="315" />           <inventory_panel             follows="all"             background_visible="true" diff --git a/indra/newview/skins/default/xui/en/panel_outfits_list.xml b/indra/newview/skins/default/xui/en/panel_outfits_list.xml index d18f0d57ca..5cf94c25d7 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_list.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_list.xml @@ -4,69 +4,22 @@     bg_alpha_color="DkGray"     border="false"     follows="all" -   height="430" +   height="400"     name="Outfits"     layout="topleft"     left="0"     top="0" -   width="312"> +   width="313">      <accordion       background_visible="true"       bg_alpha_color="DkGray2"       bg_opaque_color="DkGray2" -     no_matched_tabs_text.value="Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]." -     no_matched_tabs_text.v_pad="10" -     no_visible_tabs_text.value="You don't have any outfits yet. Try [secondlife:///app/search/all/ Search]"       follows="all"       height="400"       layout="topleft"       left="3"       name="outfits_accordion"       top="0" -     width="309"> +     width="307">      </accordion> -    <panel -     background_visible="true" -	 follows="bottom|left|right" -	 height="28" -	 layout="topleft" -	 left="4" -	 top_pad="0" -	 visible="true" -	 name="bottom_panel" -	 width="312"> -     <button -       follows="bottom|left" -       tool_tip="Show additional options" -       height="25" -       image_hover_unselected="Toolbar_Left_Over" -       image_overlay="OptionsMenu_Off" -       image_selected="Toolbar_Left_Selected" -       image_unselected="Toolbar_Left_Off" -       layout="topleft" -       left="0" -       name="options_gear_btn" -       top="1" -       width="31" /> -     <icon -       follows="bottom|left|right" -       height="25" -       image_name="Toolbar_Middle_Off" -       layout="topleft" -       left_pad="1" -       name="dummy_icon" -       width="243"/> -      <button -       follows="bottom|right" -       height="25" -       image_hover_unselected="Toolbar_Right_Over" -       image_overlay="TrashItem_Off" -       image_selected="Toolbar_Right_Selected" -       image_unselected="Toolbar_Right_Off" -       layout="topleft" -       left_pad="1" -       name="trash_btn" -       tool_tip="Delete selected outfit" -       width="31"/> -    </panel>  </panel> diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 61784fede4..066ea3be6e 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -16,13 +16,13 @@       value="No recent people. Looking for people to hang out with? Try [secondlife:///app/search/people Search] or the [secondlife:///app/worldmap World Map]." />      <string       name="no_filtered_recent_people" -     value="Didn't find what you're looking for? Try [secondlife:///app/search/people Search]." /> +     value="Didn't find what you're looking for? Try [secondlife:///app/search/people/[SEARCH_TERM] Search]." />      <string       name="no_one_near"       value="No one nearby. Looking for people to hang out with? Try [secondlife:///app/search/people Search] or the [secondlife:///app/worldmap World Map]." />      <string       name="no_one_filtered_near" -     value="Didn't find what you're looking for? Try [secondlife:///app/search/people Search]." /> +     value="Didn't find what you're looking for? Try [secondlife:///app/search/people/[SEARCH_TERM] Search]." />      <string       name="no_friends_online"       value="No friends online" /> @@ -30,6 +30,15 @@       name="no_friends"       value="No friends" />      <string +     name="no_friends_msg"> +         Find friends using [secondlife:///app/search/people Search] or right-click on a Resident to add them as a friend. +Looking for people to hang out with? Try the [secondlife:///app/worldmap World Map]. +    </string> +    <string +     name="no_filtered_friends_msg"> +         Didn't find what you're looking for? Try [secondlife:///app/search/people/[SEARCH_TERM] Search]. +    </string> +    <string       name="people_filter_label"       value="Filter People" />      <string @@ -41,7 +50,7 @@       -->      <string       name="no_filtered_groups_msg" -     value="Didn't find what you're looking for? Try [secondlife:///app/search/groups Search]." /> +     value="Didn't find what you're looking for? Try [secondlife:///app/search/groups/[SEARCH_TERM] Search]." />      <string       name="no_groups_msg"       value="Looking for Groups to join? Try [secondlife:///app/search/groups Search]." /> @@ -265,14 +274,11 @@              <text               follows="all"               height="450" -             left="10" -             name="no_friends_msg" +             left="13" +             name="no_friends_help_text"               top="10"               width="293" -             wrap="true"> -                Find friends using [secondlife:///app/search/people Search] or right-click on a Resident to add them as a friend. -Looking for people to hang out with? Try the [secondlife:///app/worldmap World Map]. -             </text> +             wrap="true" />          </panel>          <panel           background_opaque="true" @@ -293,6 +299,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M       Values are set from appropriate strings at the top of file via LLPeoplePanel::postBuild()      -->              <group_list +             allow_select="true"                background_visible="true"               bg_alpha_color="DkGray2"               bg_opaque_color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 500e65b916..2c6ceeef2e 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -374,5 +374,5 @@     min_val="10"     name="web_proxy_port"     top_delta="0" -   width="140" /> +   width="145" />  </panel> diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index a666608103..d7a601d7a3 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -389,14 +389,6 @@           name="edit_profile_btn"           tool_tip="Edit your personal information"           width="130" /> -        <button -         follows="bottom|right" -         height="23" -         label="Edit Appearance" -         left_pad="10" -         name="edit_appearance_btn" -         tool_tip="Create/edit your appearance: physical data, clothes and etc." -         width="130" />          </layout_panel>  </layout_stack> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 80fddcba43..b0e43e72ed 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -1842,7 +1842,8 @@ Clears (deletes) the media and all params from the given face.  	<string name="LeaveMouselook">Press ESC to return to World View</string>  	<!-- inventory --> -	<string name="InventoryNoMatchingItems">No matching items found in inventory.  Try [secondlife:///app/search/groups "Search"].</string> +	<string name="InventoryNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search].</string> +	<string name="PlacesNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search].</string>  	<string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string>  	<string name="InventoryNoTexture">You do not have a copy of this texture in your inventory</string>      <!-- use value="" because they have preceding spaces --> @@ -2897,6 +2898,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE].    <string name="LocationCtrlBuildTooltip">Building/dropping objects not allowed</string>    <string name="LocationCtrlScriptsTooltip">Scripts not allowed</string>    <string name="LocationCtrlDamageTooltip">Health</string> +  <string name="LocationCtrlAdultIconTooltip">Adult Region</string> +  <string name="LocationCtrlModerateIconTooltip">Moderate Region</string> +  <string name="LocationCtrlGeneralIconTooltip">General Region</string>    <!-- Strings used by the (currently Linux) auto-updater app -->  	<string name="UpdaterWindowTitle"> @@ -2930,6 +2934,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE].  	  Failed to start viewer  	</string> +	<!-- System Messages --> +	<string name="ItemsComingInTooFastFrom">[APP_NAME]: Items coming in too fast from [FROM_NAME], automatic preview disabled for [TIME] seconds</string> +	<string name="ItemsComingInTooFast">[APP_NAME]: Items coming in too fast, automatic preview disabled for [TIME] seconds</string> +  	<!-- IM system messages -->  	<string name="IM_logging_string">-- Instant message logging enabled --</string>  	<string name="IM_typing_start_string">[NAME] is typing...</string> @@ -3110,4 +3118,7 @@ Abuse Report</string>    <string name="DefaultMimeType">none/none</string>    <string name="texture_load_dimensions_error">Can't load images larger than [WIDTH]*[HEIGHT]</string> +  <!-- language specific white-space characters, delimiters, spacers, item separation symbols --> +  <string name="sentences_separator" value=" "></string> +    </strings> diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml index 37d60f1671..02ea661da3 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -7,7 +7,7 @@                  icon_maturity_general="Parcel_PG_Light"                  icon_maturity_adult="Parcel_R_Light"                  icon_maturity_moderate="Parcel_M_Light" -                maturity_help_topic="maturity_rating" +                maturity_help_topic="TODO"                  add_landmark_image_enabled="Favorite_Star_Active"                  add_landmark_image_disabled="Favorite_Star_Off"                  add_landmark_image_hover="Favorite_Star_Over" diff --git a/indra/newview/skins/default/xui/es/floater_about_land.xml b/indra/newview/skins/default/xui/es/floater_about_land.xml index 6118a63872..f3a278945c 100644 --- a/indra/newview/skins/default/xui/es/floater_about_land.xml +++ b/indra/newview/skins/default/xui/es/floater_about_land.xml @@ -263,7 +263,7 @@ Vaya al menú Mundo > Acerca del terreno o seleccione otra parcela para ver s  			<text left="204" name="selected_objects_text" width="48">  				[COUNT]  			</text> -			<text left="4" name="Autoreturn" width="412"> +			<text name="Autoreturn">  				Devolución automát. de objetos de otros (en min., 0 la desactiva):  			</text>  			<line_editor name="clean other time" right="-20"/> diff --git a/indra/newview/skins/default/xui/es/floater_customize.xml b/indra/newview/skins/default/xui/es/floater_customize.xml index b7058d4314..77b670d5f0 100644 --- a/indra/newview/skins/default/xui/es/floater_customize.xml +++ b/indra/newview/skins/default/xui/es/floater_customize.xml @@ -81,7 +81,7 @@  			<texture_picker label="Tatuaje: inferior" name="Lower Tattoos" tool_tip="Pulse para elegir una imagen" width="90"/>  			<button label="Crear una piel nueva" label_selected="Crear una piel nueva" name="Create New"/>  			<button label="Guardar" label_selected="Guardar" left="113" name="Save"/> -			<button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> +			<button label="Guardar como..." label_selected="Guardar como..." name="Save As"/>  			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>  		</panel>  		<panel label="Pelo" name="Hair"> @@ -116,7 +116,7 @@  			<texture_picker label="Textura" name="Texture" tool_tip="Pulse para elegir una imagen"/>  			<button label="Crear un pelo nuevo" label_selected="Crear un pelo nuevo" name="Create New"/>  			<button label="Guardar" label_selected="Guardar" left="113" name="Save"/> -			<button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> +			<button label="Guardar como..." label_selected="Guardar como..." name="Save As"/>  			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>  		</panel>  		<panel label="Ojos" name="Eyes"> @@ -147,7 +147,7 @@  			<texture_picker label="Iris" name="Iris" tool_tip="Pulse para elegir una imagen"/>  			<button label="Crear unos ojos nuevos" label_selected="Crear unos ojos nuevos" name="Create New"/>  			<button label="Guardar" label_selected="Guardar" left="113" name="Save"/> -			<button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> +			<button label="Guardar como..." label_selected="Guardar como..." name="Save As"/>  			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>  		</panel>  		<text label="Ropa" name="clothes_placeholder"> @@ -159,7 +159,7 @@  			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>  			<button label="Crear una falda nueva" label_selected="Crear una falda nueva" name="Create New"/>  			<button label="Guardar" label_selected="Guardar" left="113" name="Save"/> -			<button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> +			<button label="Guardar como..." label_selected="Guardar como..." name="Save As"/>  			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>  			<text name="title">  				[DESC] @@ -192,7 +192,7 @@  			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>  			<button label="Crear unos pantalones nuevos" label_selected="Crear unos pantalones nuevos" name="Create New" width="185"/>  			<button label="Guardar" label_selected="Guardar" left="113" name="Save"/> -			<button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> +			<button label="Guardar como..." label_selected="Guardar como..." name="Save As"/>  			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>  			<text name="title">  				[DESC] @@ -249,7 +249,7 @@  			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>  			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>  			<button label="Guardar" label_selected="Guardar" left="113" name="Save"/> -			<button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> +			<button label="Guardar como..." label_selected="Guardar como..." name="Save As"/>  			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>  		</panel>  		<panel label="Calcetines" name="Socks"> @@ -282,7 +282,7 @@  			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>  			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>  			<button label="Guardar" label_selected="Guardar" left="113" name="Save"/> -			<button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> +			<button label="Guardar como..." label_selected="Guardar como..." name="Save As"/>  			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>  		</panel>  		<panel label="Chaqueta" name="Jacket"> @@ -316,7 +316,7 @@  			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>  			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>  			<button label="Guardar" label_selected="Guardar" left="113" name="Save"/> -			<button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> +			<button label="Guardar como..." label_selected="Guardar como..." name="Save As"/>  			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>  		</panel>  		<panel label="Guantes" name="Gloves"> @@ -349,7 +349,7 @@  			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>  			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>  			<button label="Guardar" label_selected="Guardar" left="113" name="Save"/> -			<button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> +			<button label="Guardar como..." label_selected="Guardar como..." name="Save As"/>  			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>  		</panel>  		<panel label="Camiseta" name="Undershirt"> @@ -382,7 +382,7 @@  			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>  			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>  			<button label="Guardar" label_selected="Guardar" left="113" name="Save"/> -			<button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> +			<button label="Guardar como..." label_selected="Guardar como..." name="Save As"/>  			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>  		</panel>  		<panel label="Ropa interior" name="Underpants"> @@ -415,7 +415,7 @@  			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>  			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>  			<button label="Guardar" label_selected="Guardar" left="113" name="Save"/> -			<button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> +			<button label="Guardar como..." label_selected="Guardar como..." name="Save As"/>  			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>  		</panel>  		<panel label="Falda" name="Skirt"> @@ -448,7 +448,7 @@  			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>  			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>  			<button label="Guardar" label_selected="Guardar" left="113" name="Save"/> -			<button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> +			<button label="Guardar como..." label_selected="Guardar como..." name="Save As"/>  			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>  		</panel>  		<panel label="Tatuaje" name="Tattoo"> diff --git a/indra/newview/skins/default/xui/fr/floater_about_land.xml b/indra/newview/skins/default/xui/fr/floater_about_land.xml index 5263de4532..2e52a90373 100644 --- a/indra/newview/skins/default/xui/fr/floater_about_land.xml +++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml @@ -62,9 +62,6 @@  			<panel.string name="no_selection_text">  				Aucune parcelle sélectionnée.  			</panel.string> -			<panel.string name="time_stamp_template"> -				[wkday,datetime,local] [day,datetime,local] [mth,datetime,local] [year,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] -			</panel.string>  			<text name="Name:">  				Nom :  			</text> @@ -220,10 +217,10 @@ ou divisé.  				[COUNT] sur [MAX] ([DELETED] seront supprimés)  			</panel.string>  			<text name="parcel_object_bonus"> -				Facteur Bonus objets : [BONUS] +				Facteur Bonus Objets : [BONUS]  			</text>  			<text name="Simulator primitive usage:"> -				Utilisation des primitives : +				Utilisation des prims :  			</text>  			<text left="214" name="objects_available" width="230">  				[COUNT] sur [MAX] ([AVAILABLE] disponibles) diff --git a/indra/newview/skins/default/xui/fr/floater_color_picker.xml b/indra/newview/skins/default/xui/fr/floater_color_picker.xml index 2bcf567655..c54e3e9ce0 100644 --- a/indra/newview/skins/default/xui/fr/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/fr/floater_color_picker.xml @@ -25,7 +25,7 @@  	<text left="8" name="Current color:">  		Couleur actuelle :  	</text> -	<text left="8" name="(Drag below to save.)" width="220"> +	<text name="(Drag below to save.)">  		Enr. : faire glisser dessous  	</text>  </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_customize.xml b/indra/newview/skins/default/xui/fr/floater_customize.xml index 6da010776e..ff407b25c1 100644 --- a/indra/newview/skins/default/xui/fr/floater_customize.xml +++ b/indra/newview/skins/default/xui/fr/floater_customize.xml @@ -1,11 +1,11 @@  <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="APPARENCE" width="548"> -	<tab_container name="customize tab container" tab_min_width="150" width="546"> +<floater name="floater customize" title="APPARENCE"> +	<tab_container name="customize tab container" tab_min_width="150">  		<text label="Parties du corps" name="body_parts_placeholder">  			Parties du corps  		</text>  		<panel label="Silhouette" left="154" name="Shape" width="389"> -			<button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> +			<button label="Rétablir" label_selected="Rétablir" name="Revert"/>  			<button label="Corps" label_selected="Corps" name="Body"/>  			<button label="Tête" label_selected="Tête" name="Head"/>  			<button label="Yeux" label_selected="Yeux" name="Eyes"/> @@ -44,8 +44,8 @@  				Silhouette :  			</text>  			<button label="Créer une silhouette" label_selected="Créer une silhouette" name="Create New"/> -			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> -			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> +			<button label="Enregistrer" label_selected="Enregistrer" name="Save"/> +			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/>  		</panel>  		<panel label="Peau" name="Skin">  			<button label="Couleur" label_selected="Couleur" name="Skin Color" width="84"/> @@ -80,9 +80,9 @@  			<texture_picker label="Tatouages haut" name="Upper Tattoos" tool_tip="Cliquez pour sélectionner une image" width="78"/>  			<texture_picker label="Tatouages bas" name="Lower Tattoos" tool_tip="Cliquez pour sélectionner une image" width="78"/>  			<button label="Créer une peau" label_selected="Créer une peau" name="Create New"/> -			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> -			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> -			<button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> +			<button label="Enregistrer" label_selected="Enregistrer" name="Save"/> +			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> +			<button label="Rétablir" label_selected="Rétablir" name="Revert"/>  		</panel>  		<panel label="Cheveux" name="Hair">  			<button label="Couleur" label_selected="Couleur" name="Color"/> @@ -115,9 +115,9 @@  			</text>  			<texture_picker label="Texture" name="Texture" tool_tip="Cliquez pour sélectionner une image"/>  			<button label="Créer des cheveux" label_selected="Créer des cheveux" name="Create New"/> -			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> -			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> -			<button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> +			<button label="Enregistrer" label_selected="Enregistrer" name="Save"/> +			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> +			<button label="Rétablir" label_selected="Rétablir" name="Revert"/>  		</panel>  		<panel label="Yeux" name="Eyes">  			<text name="title"> @@ -146,9 +146,9 @@  			</text>  			<texture_picker label="Iris" name="Iris" tool_tip="Cliquez pour sélectionner une image"/>  			<button label="Créer des yeux" label_selected="Créer des yeux" name="Create New"/> -			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> -			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> -			<button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> +			<button label="Enregistrer" label_selected="Enregistrer" name="Save"/> +			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> +			<button label="Rétablir" label_selected="Rétablir" name="Revert"/>  		</panel>  		<text label="Habits" name="clothes_placeholder">  			Habits @@ -158,9 +158,9 @@  			<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/>  			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>  			<button label="Créer une chemise" label_selected="Créer une chemise" name="Create New"/> -			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> -			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> -			<button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> +			<button label="Enregistrer" label_selected="Enregistrer" name="Save"/> +			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> +			<button label="Rétablir" label_selected="Rétablir" name="Revert"/>  			<text name="title">  				[DESC]  			</text> @@ -191,9 +191,9 @@  			<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/>  			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>  			<button label="Créer un pantalon" label_selected="Créer un pantalon" name="Create New"/> -			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> -			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> -			<button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> +			<button label="Enregistrer" label_selected="Enregistrer" name="Save"/> +			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> +			<button label="Rétablir" label_selected="Rétablir" name="Revert"/>  			<text name="title">  				[DESC]  			</text> @@ -248,9 +248,9 @@  			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>  			<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/>  			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> -			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> -			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> -			<button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> +			<button label="Enregistrer" label_selected="Enregistrer" name="Save"/> +			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> +			<button label="Rétablir" label_selected="Rétablir" name="Revert"/>  		</panel>  		<panel label="Chaussettes" name="Socks">  			<text name="title"> @@ -281,9 +281,9 @@  			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>  			<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/>  			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> -			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> -			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> -			<button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> +			<button label="Enregistrer" label_selected="Enregistrer" name="Save"/> +			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> +			<button label="Rétablir" label_selected="Rétablir" name="Revert"/>  		</panel>  		<panel label="Veste" name="Jacket">  			<text name="title"> @@ -315,9 +315,9 @@  			<texture_picker label="Tissu (dessous)" name="Lower Fabric" tool_tip="Cliquez pour sélectionner une image" width="81"/>  			<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="81"/>  			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> -			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> -			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> -			<button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> +			<button label="Enregistrer" label_selected="Enregistrer" name="Save"/> +			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> +			<button label="Rétablir" label_selected="Rétablir" name="Revert"/>  		</panel>  		<panel label="Gants" name="Gloves">  			<text name="title"> @@ -348,9 +348,9 @@  			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>  			<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/>  			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> -			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> -			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> -			<button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> +			<button label="Enregistrer" label_selected="Enregistrer" name="Save"/> +			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> +			<button label="Rétablir" label_selected="Rétablir" name="Revert"/>  		</panel>  		<panel label="Débardeur" name="Undershirt">  			<text name="title"> @@ -375,15 +375,15 @@  			<text name="no modify instructions">  				Vous n'avez pas la permission de modifier cet objet.  			</text> -			<text bottom="-470" name="Item Action Label" right="92"> +			<text name="Item Action Label">  				Débardeur :  			</text>  			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>  			<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/>  			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> -			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> -			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> -			<button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> +			<button label="Enregistrer" label_selected="Enregistrer" name="Save"/> +			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> +			<button label="Rétablir" label_selected="Rétablir" name="Revert"/>  		</panel>  		<panel label="Caleçon" name="Underpants">  			<text name="title"> @@ -408,15 +408,15 @@  			<text name="no modify instructions">  				Vous n'avez pas la permission de modifier cet objet.  			</text> -			<text bottom="-470" name="Item Action Label" right="92"> +			<text name="Item Action Label">  				Caleçon :  			</text>  			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>  			<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/>  			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> -			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> -			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> -			<button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> +			<button label="Enregistrer" label_selected="Enregistrer" name="Save"/> +			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> +			<button label="Rétablir" label_selected="Rétablir" name="Revert"/>  		</panel>  		<panel label="Jupe" name="Skirt">  			<text name="title"> @@ -447,9 +447,9 @@  			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>  			<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/>  			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> -			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> -			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> -			<button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> +			<button label="Enregistrer" label_selected="Enregistrer" name="Save"/> +			<button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> +			<button label="Rétablir" label_selected="Rétablir" name="Revert"/>  		</panel>  		<panel label="Tatouage" name="Tattoo">  			<text name="title"> diff --git a/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml index 73770dce5f..4cfdfd2614 100644 --- a/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml @@ -6,10 +6,9 @@  	<menu_item_call label="Afficher les filtres" name="show_filters"/>  	<menu_item_call label="Réinitialiser les filtres" name="reset_filters"/>  	<menu_item_call label="Fermer tous les dossiers" name="close_folders"/> +	<menu_item_call label="Vider la corbeille" name="empty_trash"/>  	<menu_item_call label="Vider les objets trouvés" name="empty_lostnfound"/>  	<menu_item_call label="Enregistrer la texture sous" name="Save Texture As"/> -	<menu_item_call label="Partager" name="Share"/>  	<menu_item_call label="Trouver l'original" name="Find Original"/>  	<menu_item_call label="Trouver tous les liens" name="Find All Links"/> -	<menu_item_call label="Vider la corbeille" name="empty_trash"/>  </menu> diff --git a/indra/newview/skins/default/xui/fr/panel_main_inventory.xml b/indra/newview/skins/default/xui/fr/panel_main_inventory.xml index f631cf8b85..6cd9db2a5e 100644 --- a/indra/newview/skins/default/xui/fr/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/fr/panel_main_inventory.xml @@ -9,20 +9,62 @@  	<text name="ItemcountText">  		Objets :  	</text> +	<menu_bar name="Inventory Menu"> +		<menu label="Fichier" name="File"> +			<menu_item_call label="Ouvrir" name="Open"/> +			<menu label="Charger" name="upload"> +				<menu_item_call label="Image ([COST] L$)..." name="Upload Image"/> +				<menu_item_call label="Son ([COST] L$)..." name="Upload Sound"/> +				<menu_item_call label="Animation ([COST] L$)..." name="Upload Animation"/> +				<menu_item_call label="Lot ([COST] L$ par fichier)..." name="Bulk Upload"/> +			</menu> +			<menu_item_call label="Nouvelle fenêtre" name="New Window"/> +			<menu_item_call label="Afficher les filtres" name="Show Filters"/> +			<menu_item_call label="Réinitialiser les filtres" name="Reset Current"/> +			<menu_item_call label="Fermer tous les dossiers" name="Close All Folders"/> +			<menu_item_call label="Vider la corbeille" name="Empty Trash"/> +			<menu_item_call label="Vider les objets trouvés" name="Empty Lost And Found"/> +		</menu> +		<menu label="Créer" name="Create"> +			<menu_item_call label="Nouveau dossier" name="New Folder"/> +			<menu_item_call label="Nouveau script" name="New Script"/> +			<menu_item_call label="Nouvelle note" name="New Note"/> +			<menu_item_call label="Nouveau geste" name="New Gesture"/> +			<menu label="Nouveaux habits" name="New Clothes"> +				<menu_item_call label="Nouvelle chemise" name="New Shirt"/> +				<menu_item_call label="Nouveau pantalon" name="New Pants"/> +				<menu_item_call label="Nouvelles chaussures" name="New Shoes"/> +				<menu_item_call label="Nouvelles chaussettes" name="New Socks"/> +				<menu_item_call label="Nouvelle veste" name="New Jacket"/> +				<menu_item_call label="Nouvelle jupe" name="New Skirt"/> +				<menu_item_call label="Nouveaux gants" name="New Gloves"/> +				<menu_item_call label="Nouveau débardeur" name="New Undershirt"/> +				<menu_item_call label="Nouveau caleçon" name="New Underpants"/> +				<menu_item_call label="Nouvel alpha" name="New Alpha"/> +				<menu_item_call label="Nouveau tatouage" name="New Tattoo"/> +			</menu> +			<menu label="Nouvelles parties du corps" name="New Body Parts"> +				<menu_item_call label="Nouvelle silhouette" name="New Shape"/> +				<menu_item_call label="Nouvelle peau" name="New Skin"/> +				<menu_item_call label="Nouveaux cheveux" name="New Hair"/> +				<menu_item_call label="Nouveaux yeux" name="New Eyes"/> +			</menu> +		</menu> +		<menu label="Trier" name="Sort"> +			<menu_item_check label="Par nom" name="By Name"/> +			<menu_item_check label="Par date" name="By Date"/> +			<menu_item_check label="Dossiers toujours par nom" name="Folders Always By Name"/> +			<menu_item_check label="Dossiers système en premier" name="System Folders To Top"/> +		</menu> +	</menu_bar>  	<filter_editor label="Filtrer l'inventaire" name="inventory search editor"/>  	<tab_container name="inventory filter tabs">  		<inventory_panel label="MON INVENTAIRE" name="All Items"/> -		<recent_inventory_panel label="RÉCENT" name="Recent Items"/> +		<inventory_panel label="RÉCENT" name="Recent Items"/>  	</tab_container> -	<layout_stack name="bottom_panel"> -		<layout_panel name="options_gear_btn_panel"> -			<button name="options_gear_btn" tool_tip="Afficher d'autres options"/> -		</layout_panel> -		<layout_panel name="add_btn_panel"> -			<button name="add_btn" tool_tip="Ajouter un nouvel article"/> -		</layout_panel> -		<layout_panel name="trash_btn_panel"> -			<dnd_button name="trash_btn" tool_tip="Supprimer l'article sélectionné"/> -		</layout_panel> -	</layout_stack> +	<panel name="bottom_panel"> +		<button name="options_gear_btn" tool_tip="Afficher d'autres options"/> +		<button name="add_btn" tool_tip="Ajouter un nouvel article"/> +		<dnd_button name="trash_btn" tool_tip="Supprimer l'article sélectionné"/> +	</panel>  </panel> diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 61659d386b..6d81df5cdb 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -2085,7 +2085,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE].  		Large  	</string>  	<string name="Brow Size"> -		Taille +		Taille du front  	</string>  	<string name="Bug Eyes">  		Yeux globuleux @@ -2235,7 +2235,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE].  		Extrémités  	</string>  	<string name="Egg Head"> -		Forme de la tête +		Proéminence  	</string>  	<string name="Eye Bags">  		Cernes @@ -2559,7 +2559,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE].  		Fente labiale  	</string>  	<string name="Lip Cleft Depth"> -		Fente labiale +		Prof. fente labiale  	</string>  	<string name="Lip Fullness">  		Volume des lèvres @@ -2643,7 +2643,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE].  		Abaisser  	</string>  	<string name="Lower Bridge"> -		Arête plus basse +		Arête inférieure  	</string>  	<string name="Lower Cheeks">  		Joue inférieure @@ -2817,10 +2817,10 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE].  		Épaisseur du nez  	</string>  	<string name="Nose Tip Angle"> -		Bout du nez +		Angle bout du nez  	</string>  	<string name="Nose Tip Shape"> -		Bout du nez +		Forme bout du nez  	</string>  	<string name="Nose Width">  		Largeur du nez @@ -2946,7 +2946,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE].  		Plus  	</string>  	<string name="Puffy Eyelids"> -		Cernes +		Paup. gonflées  	</string>  	<string name="Rainbow Color">  		Couleur arc en ciel @@ -3237,7 +3237,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE].  		Arête supérieure  	</string>  	<string name="Upper Cheeks"> -		Pommette +		Joue supérieure  	</string>  	<string name="Upper Chin Cleft">  		Menton supérieur diff --git a/indra/newview/skins/default/xui/it/floater_about_land.xml b/indra/newview/skins/default/xui/it/floater_about_land.xml index bc23c2e8ff..742cdf44a5 100644 --- a/indra/newview/skins/default/xui/it/floater_about_land.xml +++ b/indra/newview/skins/default/xui/it/floater_about_land.xml @@ -266,7 +266,7 @@ o suddivisa.  			<text left="214" name="selected_objects_text" width="48">  				[COUNT]  			</text> -			<text left="4" name="Autoreturn" width="412"> +			<text name="Autoreturn">  				Restituzione automatica degli oggetti di altri residenti (minuti, 0 per disattivarla):  			</text>  			<line_editor name="clean other time" right="-20"/> diff --git a/indra/newview/skins/default/xui/it/floater_customize.xml b/indra/newview/skins/default/xui/it/floater_customize.xml index 75ddf43f65..63c26b4d73 100644 --- a/indra/newview/skins/default/xui/it/floater_customize.xml +++ b/indra/newview/skins/default/xui/it/floater_customize.xml @@ -1,11 +1,11 @@  <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="ASPETTO" width="551"> -	<tab_container name="customize tab container" tab_min_width="120" width="549"> +<floater name="floater customize" title="ASPETTO"> +	<tab_container name="customize tab container" tab_min_width="120">  		<text label="Parti del corpo" name="body_parts_placeholder">  			Parti del corpo  		</text> -		<panel label="Forma del corpo" left="124" name="Shape" width="389"> -			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> +		<panel label="Forma del corpo" left="124" name="Shape"> +			<button label="Crea una nuova forma del corpo" label_selected="Crea una nuova forma del corpo" name="Create New" width="190"/>  			<button label="Corpo" label_selected="Corpo" name="Body"/>  			<button label="Testa" label_selected="Testa" name="Head"/>  			<button label="Occhi" label_selected="Occhi" name="Eyes"/> @@ -40,12 +40,12 @@  			<text name="no modify instructions">  				Non hai il permesso di modificare questo indumento.  			</text> -			<text name="Item Action Label" right="89"> +			<text name="Item Action Label">  				Forma del corpo:  			</text> -			<button label="Crea una nuova forma del corpo" label_selected="Crea una nuova forma del corpo" name="Create New" width="190"/> -			<button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> -			<button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> +			<button label="Salva" label_selected="Salva" name="Save"/> +			<button label="Salva come..." label_selected="Salva come..." name="Save As"/> +			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert"/>  		</panel>  		<panel label="Pelle" name="Skin">  			<button label="Colore della pelle" label_selected="Colore della pelle" name="Skin Color" width="115"/> @@ -80,9 +80,9 @@  			<texture_picker label="Tatuaggi: superiori" name="Upper Tattoos" tool_tip="Clicca per scegliere un'immagine" width="96"/>  			<texture_picker label="Tatuaggi: inferiori" name="Lower Tattoos" tool_tip="Clicca per scegliere un'immagine" width="96"/>  			<button label="Crea una nuova pelle" label_selected="Crea una nuova pelle" name="Create New"/> -			<button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> -			<button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> -			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> +			<button label="Salva" label_selected="Salva" name="Save"/> +			<button label="Salva come..." label_selected="Salva come..." name="Save As"/> +			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert"/>  		</panel>  		<panel label="Capelli" name="Hair">  			<button label="Capelli" label_selected="Colore" name="Color"/> @@ -115,9 +115,9 @@  			</text>  			<texture_picker label="Texture" name="Texture" tool_tip="Clicca per scegliere un'immagine"/>  			<button label="Crea nuovi capelli" label_selected="Crea nuovi capelli" name="Create New"/> -			<button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> +			<button label="Salva" label_selected="Salva" name="Save"/>  			<button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> -			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> +			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/>  		</panel>  		<panel label="Occhi" name="Eyes">  			<text name="title"> @@ -146,9 +146,9 @@  			</text>  			<texture_picker label="Iride" name="Iris" tool_tip="Clicca per scegliere un'immagine"/>  			<button label="Crea nuovi occhi" label_selected="Crea nuovi occhi" name="Create New"/> -			<button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> +			<button label="Salva" label_selected="Salva" name="Save"/>  			<button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> -			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> +			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/>  		</panel>  		<text label="Vestiti" name="clothes_placeholder">  			Abiti @@ -158,9 +158,9 @@  			<color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/>  			<button label="Togli" label_selected="Togli" name="Take Off"/>  			<button label="Crea una nuova camicia" label_selected="Crea una nuova camicia" name="Create New"/> -			<button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> +			<button label="Salva" label_selected="Salva" name="Save"/>  			<button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> -			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> +			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche"  name="Revert" width="120"/>  			<text name="title">  				[DESC]  			</text> @@ -191,9 +191,9 @@  			<color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/>  			<button label="Togli" label_selected="Togli" name="Take Off"/>  			<button label="Crea nuovi pantaloni" label_selected="Crea nuovi pantaloni" name="Create New"/> -			<button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> +			<button label="Salva" label_selected="Salva" name="Save"/>  			<button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> -			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> +			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/>  			<text name="title">  				[DESC]  			</text> @@ -248,9 +248,9 @@  			<texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere un'immagine"/>  			<color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/>  			<button label="Togli" label_selected="Togli" name="Take Off"/> -			<button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> +			<button label="Salva" label_selected="Salva" name="Save"/>  			<button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> -			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> +			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/>  		</panel>  		<panel label="Calze" name="Socks">  			<text name="title"> @@ -281,9 +281,9 @@  			<texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere un'immagine"/>  			<color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/>  			<button label="Togli" label_selected="Togli" name="Take Off"/> -			<button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> +			<button label="Salva" label_selected="Salva" name="Save"/>  			<button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> -			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> +			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/>  		</panel>  		<panel label="Giacca" name="Jacket">  			<text name="title"> @@ -315,9 +315,9 @@  			<texture_picker label="Tessuto: inferiore" name="Lower Fabric" tool_tip="Clicca per scegliere un'immagine" width="96"/>  			<color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/>  			<button label="Togli" label_selected="Togli" name="Take Off"/> -			<button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> +			<button label="Salva" label_selected="Salva" name="Save"/>  			<button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> -			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> +			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/>  		</panel>  		<panel label="Guanti" name="Gloves">  			<text name="title"> @@ -348,9 +348,9 @@  			<texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere un'immagine"/>  			<color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/>  			<button font="SansSerifSmall" label="Rimuovi l'indumento" label_selected="Rimuovi l'indumento" name="Take Off" width="115"/> -			<button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> +			<button label="Salva" label_selected="Salva" name="Save"/>  			<button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> -			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> +			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/>  		</panel>  		<panel label="Canottiera" name="Undershirt">  			<text name="title"> @@ -381,9 +381,9 @@  			<texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere un'immagine"/>  			<color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/>  			<button font="SansSerifSmall" label="Rimuovi l'indumento" label_selected="Rimuovi l'indumento" name="Take Off" width="115"/> -			<button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> +			<button label="Salva" label_selected="Salva" name="Save"/>  			<button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> -			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> +			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/>  		</panel>  		<panel label="Mutande" name="Underpants">  			<text name="title"> @@ -414,9 +414,9 @@  			<texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere un'immagine"/>  			<color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/>  			<button font="SansSerifSmall" label="Rimuovi l'indumento" label_selected="Rimuovi l'indumento" name="Take Off" width="115"/> -			<button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> +			<button label="Salva" label_selected="Salva" name="Save"/>  			<button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> -			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> +			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/>  		</panel>  		<panel label="Gonna" name="Skirt">  			<text name="title"> @@ -447,9 +447,9 @@  			<texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere un'immagine"/>  			<color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/>  			<button font="SansSerifSmall" label="Rimuovi l'indumento" label_selected="Rimuovi l'indumento" name="Take Off" width="115"/> -			<button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> +			<button label="Salva" label_selected="Salva" name="Save"/>  			<button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> -			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> +			<button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/>  		</panel>  		<panel label="Tatuaggio" name="Tattoo">  			<text name="title"> @@ -522,7 +522,7 @@  			<button label="Ripristina" label_selected="Ripristina" name="Revert"/>  		</panel>  	</tab_container> -	<scroll_container left="254" name="panel_container"/> +	<scroll_container name="panel_container"/>  	<button label="Informazioni script" label_selected="Informazioni script" name="script_info" tool_tip="Mostra gli script collegati al tuo avatar"/>  	<button label="Crea vestiario" label_selected="Crea vestiario" name="make_outfit_btn"/>  	<button label="Annulla" label_selected="Annulla" name="Cancel"/> diff --git a/indra/newview/skins/default/xui/ja/floater_about_land.xml b/indra/newview/skins/default/xui/ja/floater_about_land.xml index 2f5065c05f..d23ab3565b 100644 --- a/indra/newview/skins/default/xui/ja/floater_about_land.xml +++ b/indra/newview/skins/default/xui/ja/floater_about_land.xml @@ -62,9 +62,6 @@  			<panel.string name="no_selection_text">  				区画が選択されていません。  			</panel.string> -			<panel.string name="time_stamp_template"> -				[year,datetime,local] [mth,datetime,local] [day,datetime,local] [wkday,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] -			</panel.string>  			<text name="Name:">  				名前:  			</text> @@ -311,10 +308,10 @@  				(なし)  			</panel.string>  			<panel.string name="push_restrict_text"> -				プッシュ禁止 +				プッシングを制限  			</panel.string>  			<panel.string name="push_restrict_region_text"> -				プッシュ禁止 (地域設定優先) +				プッシングを制限 (地域設定優先)  			</panel.string>  			<text name="allow_label">  				他の住人への許可: @@ -340,7 +337,7 @@  				土地オプション:  			</text>  			<check_box label="安全(ダメージなし)" name="check safe" tool_tip="チェックを入れるとこの土地でのダメージコンバットが無効になり、「安全」に設定されます。 チェックを外すとダメージコンバットが有効になります。"/> -			<check_box label="プッシュ禁止" name="PushRestrictCheck" tool_tip="スクリプトによるプッシュを禁止します。 このオプションを選択することにより、あなたの土地での破壊的行動を防ぐことができます。"/> +			<check_box label="プッシングを制限" name="PushRestrictCheck" tool_tip="スクリプトによるプッシングを制限します。 このオプションを選択することにより、あなたの土地での破壊的行動を防ぐことができます。"/>  			<check_box label="検索に区画を表示(週 L$ 30)" name="ShowDirectoryCheck" tool_tip="この区画を検索結果に表示します"/>  			<combo_box name="land category with adult">  				<combo_box.item label="全カテゴリ" name="item0"/> @@ -358,7 +355,7 @@  				<combo_box.item label="その他" name="item12"/>  			</combo_box>  			<combo_box name="land category"> -				<combo_box.item label="全カテゴリ" name="item0"/> +				<combo_box.item label="全カテゴリー" name="item0"/>  				<combo_box.item label="Linden 所在地" name="item1"/>  				<combo_box.item label="アート&カルチャー" name="item3"/>  				<combo_box.item label="ビジネス" name="item4"/> @@ -382,7 +379,7 @@  			<button label="設定" label_selected="設定" name="Set" tool_tip="訪問者の着地点の設定を行います。この区画内に立って行ってください。"/>  			<button label="クリア" label_selected="クリア" name="Clear" tool_tip="着地点をクリア"/>  			<text name="Teleport Routing: "> -				テレポート経路: +				テレポート制限:  			</text>  			<combo_box name="landing type" tool_tip="テレポート経路 -- あなたの土地へのテレポート経路を選択">  				<combo_box.item label="不可" name="Blocked"/> diff --git a/indra/newview/skins/default/xui/pt/floater_about_land.xml b/indra/newview/skins/default/xui/pt/floater_about_land.xml index 252969609a..cebf03755b 100644 --- a/indra/newview/skins/default/xui/pt/floater_about_land.xml +++ b/indra/newview/skins/default/xui/pt/floater_about_land.xml @@ -265,7 +265,7 @@ ou sub-divididos.  			<text left="214" name="selected_objects_text" width="48">  				[COUNT]  			</text> -			<text left="4" name="Autoreturn" width="412"> +			<text name="Autoreturn">  				Devolver objetos de outros residentes (p/ desligar tecle 0)  			</text>  			<line_editor name="clean other time" right="-10"/> diff --git a/indra/newview/skins/default/xui/pt/floater_customize.xml b/indra/newview/skins/default/xui/pt/floater_customize.xml index 2a367cb24a..a9ec0b9b1f 100644 --- a/indra/newview/skins/default/xui/pt/floater_customize.xml +++ b/indra/newview/skins/default/xui/pt/floater_customize.xml @@ -1,6 +1,6 @@  <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="APARÊNCIA" width="546"> -	<tab_container name="customize tab container" tab_min_width="115" width="544"> +<floater name="floater customize" title="APARÊNCIA"> +	<tab_container name="customize tab container" tab_min_width="115">  		<text label="Corpo" name="body_parts_placeholder">  			Partes do corpo  		</text> diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 18ac10fe38..668e21c253 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -332,6 +332,12 @@ class WindowsManifest(ViewerManifest):              self.path("media_plugin_webkit.dll")              self.end_prefix() +        # winmm.dll shim +        if self.prefix(src='../media_plugins/winmmshim/%s' % self.args['configuration'], dst="llplugin"): +            self.path("winmm.dll") +            self.end_prefix() + +          if self.args['configuration'].lower() == 'debug':              if self.prefix(src=os.path.join(os.pardir, os.pardir, 'libraries', 'i686-win32', 'lib', 'debug'),                             dst="llplugin"): @@ -639,10 +645,14 @@ class DarwinManifest(ViewerManifest):                  self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app")                  self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app") +                # plugin launcher +                self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin.app", "SLPlugin.app") +                  # our apps dependencies on shared libs                  if dylibs["llcommon"]:                      mac_crash_logger_res_path = self.dst_path_of("mac-crash-logger.app/Contents/Resources")                      mac_updater_res_path = self.dst_path_of("mac-updater.app/Contents/Resources") +                    slplugin_res_path = self.dst_path_of("SLPlugin.app/Contents/Resources")                      for libfile in ("libllcommon.dylib",                                      "libapr-1.0.3.7.dylib",                                      "libaprutil-1.0.3.8.dylib", @@ -656,9 +666,10 @@ class DarwinManifest(ViewerManifest):                                           {'target': target_lib,                                            'link' : os.path.join(mac_updater_res_path, libfile)}                                           ) - -                # plugin launcher -                self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin", "SLPlugin") +                        self.run_command("ln -sf %(target)r %(link)r" %  +                                         {'target': target_lib, +                                          'link' : os.path.join(slplugin_res_path, libfile)} +                                         )                  # plugins                  if self.prefix(src="", dst="llplugin"):  | 
