diff options
153 files changed, 1468 insertions, 459 deletions
| diff --git a/doc/contributions.txt b/doc/contributions.txt index 9b3087a0ac..6b51e2649e 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -1,7 +1,7 @@  Linden Lab would like to acknowledge source code contributions from the -following residents.   The Second Life resident name is given below, +following residents. The Second Life resident name is given below,  along with the issue identifier corresponding to the patches we've -received from them.  To see more about these contributions, visit the +received from them. To see more about these contributions, visit the  browsable version: http://wiki.secondlife.com/wiki/Source_contributions  Able Whitman @@ -25,19 +25,25 @@ Aimee Trescothick  	VWR-6348  	VWR-6358  	VWR-6360 +	VWR-6432  	VWR-6550  	VWR-6583  	VWR-6482  	VWR-7109  	VWR-7383 +	VWR-7800 +	VWR-8008  	VWR-8341  	VWR-8430  	VWR-8482  	VWR-9255 +	VWR-10717  	VWR-10990  	VWR-11100  	VWR-11111 - 	VWR-11844 +	VWR-11844 +	VWR-14267 +	VWR-14278  	VWR-14087  Alejandro Rosenthal  	VWR-1184 @@ -45,9 +51,11 @@ Aleric Inglewood  	VWR-10001  	VWR-10759  	VWR-10837 +	VWR-12691  	VWR-13996 +	VWR-14426  Ales Beaumont -    VWR-9352 +	VWR-9352  Alissa Sabre  	VWR-81  	VWR-83 @@ -69,7 +77,7 @@ Alissa Sabre  	VWR-1351  	VWR-1353  	VWR-1410 -        VWR-1843 +	VWR-1843  	VWR-2116  	VWR-2826  	VWR-3290 @@ -77,19 +85,25 @@ Alissa Sabre  	VWR-3857  	VWR-4010  	VWR-5575 -        VWR-5929 -        VWR-6384 -        VWR-6385 +	VWR-5717 +	VWR-5929 +	VWR-6384 +	VWR-6385  	VWR-6386 -        VWR-6430 +	VWR-6430  	VWR-6858 -        VWR-6668 -        VWR-7086 -        VWR-7087 -        VWR-7153 -        VWR-7168 +	VWR-6668 +	VWR-7086 +	VWR-7087 +	VWR-7153 +	VWR-7168  	VWR-9190  	VWR-10728 +	VWR-11172 +	VWR-12569 +	VWR-12617 +	VWR-12620 +	VWR-12789  Angus Boyd  	VWR-592  Ann Congrejo @@ -147,6 +161,7 @@ Carjay McGinnis  	VWR-4212  	VWR-6154  	VWR-9400 +	VWR-9620  Catherine Pfeffer  	VWR-1282  	VWR-8624 @@ -294,6 +309,7 @@ Kerutsen Sellery  	VWR-1350  Khyota Wulluf  	VWR-2085 +	VWR-8885  	VWR-9256  	VWR-9966  Kunnis Basiat @@ -336,6 +352,7 @@ McCabe Maxsted  	VWR-7877  	VWR-7893  	VWR-8080 +	VWR-8454  	VWR-8689  	VWR-9007  Michelle2 Zenovka @@ -350,6 +367,7 @@ Michelle2 Zenovka  	VWR-5082  	VWR-5659  	VWR-7831 +	VWR-8885  	VWR-8889  	VWR-8310  	VWR-9499 @@ -464,7 +482,7 @@ Pf Shan  	CT-321  princess niven  	VWR-5733 -        CT-85 +	CT-85  	CT-320  	CT-352  Renault Clio @@ -481,7 +499,11 @@ Ringo Tuxing  Robin Cornelius  	VWR-2488  	VWR-9557 +	VWR-11128 +	VWR-12533  	VWR-12587 +	VWR-12763 +	VWR-12995  Ryozu Kojima  	VWR-53  	VWR-287 @@ -564,12 +586,16 @@ TBBle Kurosawa  	VWR-1892  Teardrops Fall  	VWR-5366 +Techwolf Lupindo +	SNOW-92 +	VWR-12385  tenebrous pau  	VWR-247  Tharax Ferraris  	VWR-605  Thickbrick Sleaford  	VWR-7109 +	VWR-9287  	VWR-13947  Thraxis Epsilon  	SVC-371 diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 2a70263446..b168c08552 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -170,6 +170,8 @@ if (LINUX)      if (NOT STANDALONE)        # this stops us requiring a really recent glibc at runtime        add_definitions(-fno-stack-protector) +      # linking can be so slow - give us a chance to figure out why +      set(CMAKE_CXX_LINK_FLAGS "-Wl,--stats,--no-keep-memory")      endif (NOT STANDALONE)    endif (VIEWER) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index c0efa27f6e..a5b9cf47a4 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -13,9 +13,9 @@ if (STANDALONE)        SDL_LIBRARY        )  else (STANDALONE) -  use_prebuilt_binary(SDL)    use_prebuilt_binary(mesa)    if (LINUX AND VIEWER) +    use_prebuilt_binary(SDL)      set (SDL_FOUND TRUE)      set (SDL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/i686-linux)      set (SDL_LIBRARY SDL) diff --git a/indra/cmake/Python.cmake b/indra/cmake/Python.cmake index 4f86d3234e..0901c1b7a2 100644 --- a/indra/cmake/Python.cmake +++ b/indra/cmake/Python.cmake @@ -13,6 +13,10 @@ if (WINDOWS)      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath] +    [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath] +    [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] +    [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] +    [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]      )  elseif (EXISTS /etc/debian_version)    # On Debian and Ubuntu, avoid Python 2.4 if possible. diff --git a/indra/linux_crash_logger/CMakeLists.txt b/indra/linux_crash_logger/CMakeLists.txt index 6f6754ed7a..4b19e28066 100644 --- a/indra/linux_crash_logger/CMakeLists.txt +++ b/indra/linux_crash_logger/CMakeLists.txt @@ -38,7 +38,7 @@ list(APPEND linux_crash_logger_SOURCE_FILES       ${linux_crash_logger_HEADER_FILES}       ) -list(APPEND CMAKE_EXE_LINKER_FLAGS -Wl,--as-needed) +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")  add_executable(linux-crash-logger ${linux_crash_logger_SOURCE_FILES}) diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index 099c4eba40..ae959eaa81 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -43,6 +43,8 @@  #include "llassetstorage.h"  #include "llrefcount.h" +#include "llvorbisencode.h" +  #include "vorbis/codec.h"  #include "vorbis/vorbisfile.h" @@ -218,11 +220,42 @@ BOOL LLVorbisDecodeState::initDecode()  		return(FALSE);  	} -	size_t size_guess = (size_t)ov_pcm_total(&mVF, -1); +	S32 sample_count = ov_pcm_total(&mVF, -1); +	size_t size_guess = (size_t)sample_count;  	vorbis_info* vi = ov_info(&mVF, -1);  	size_guess *= vi->channels;  	size_guess *= 2;  	size_guess += 2048; +	 +	bool abort_decode = false; +	 +	if( vi->channels < 1 || vi->channels > LLVORBIS_CLIP_MAX_CHANNELS ) +	{ +		abort_decode = true; +		llwarns << "Bad channel count: " << vi->channels << llendl; +	} +	 +	if( (size_t)sample_count > LLVORBIS_CLIP_REJECT_SAMPLES ) +	{ +		abort_decode = true; +		llwarns << "Illegal sample count: " << sample_count << llendl; +	} +	 +	if( size_guess > LLVORBIS_CLIP_REJECT_SIZE ) +	{ +		abort_decode = true; +		llwarns << "Illegal sample size: " << size_guess << llendl; +	} +	 +	if( abort_decode ) +	{ +		llwarns << "Canceling initDecode. Bad asset: " << mUUID << llendl; +		llwarns << "Bad asset encoded by: " << ov_comment(&mVF,-1)->vendor << llendl; +		delete mInFilep; +		mInFilep = NULL; +		return FALSE; +	} +	  	mWAVBuffer.reserve(size_guess);  	mWAVBuffer.resize(WAV_HEADER_SIZE); diff --git a/indra/llaudio/llvorbisencode.cpp b/indra/llaudio/llvorbisencode.cpp index 8ee082a245..0c1ad8191c 100644 --- a/indra/llaudio/llvorbisencode.cpp +++ b/indra/llaudio/llvorbisencode.cpp @@ -162,13 +162,13 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro  		  return(LLVORBISENC_PCM_FORMAT_ERR);  	} -	if ((num_channels < 1) || (num_channels > 2)) +	if ((num_channels < 1) || (num_channels > LLVORBIS_CLIP_MAX_CHANNELS))  	{	  		error_msg = "SoundFileInvalidChannelCount";  		return(LLVORBISENC_MULTICHANNEL_ERR);  	} -	if (sample_rate != 44100) +	if (sample_rate != LLVORBIS_CLIP_SAMPLE_RATE)  	{	  		error_msg = "SoundFileInvalidSampleRate";  		return(LLVORBISENC_UNSUPPORTED_SAMPLE_RATE); @@ -188,7 +188,7 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro  	F32 clip_length = (F32)raw_data_length/(F32)bytes_per_sec; -	if (clip_length > 10.0f) +	if (clip_length > LLVORBIS_CLIP_MAX_TIME)  	{  		error_msg = "SoundFileInvalidTooLong";  		return(LLVORBISENC_CLIP_TOO_LONG);		  diff --git a/indra/llaudio/llvorbisencode.h b/indra/llaudio/llvorbisencode.h index ff5ce3a053..6531c1919e 100644 --- a/indra/llaudio/llvorbisencode.h +++ b/indra/llaudio/llvorbisencode.h @@ -45,6 +45,17 @@ const S32 LLVORBISENC_UNSUPPORTED_SAMPLE_RATE      = 8; // unsupported sample ra  const S32 LLVORBISENC_UNSUPPORTED_WORD_SIZE        = 9; // unsupported word size  const S32 LLVORBISENC_CLIP_TOO_LONG                = 10; // source file is too long +const F32 LLVORBIS_CLIP_MAX_TIME                               = 10.0f; +const U8  LLVORBIS_CLIP_MAX_CHANNELS                   = 2; +const U32 LLVORBIS_CLIP_SAMPLE_RATE                            = 44100; +const U32 LLVORBIS_CLIP_MAX_SAMPLES_PER_CHANNEL        = (U32)(LLVORBIS_CLIP_MAX_TIME * LLVORBIS_CLIP_SAMPLE_RATE); +const U32 LLVORBIS_CLIP_MAX_SAMPLES                            = LLVORBIS_CLIP_MAX_SAMPLES_PER_CHANNEL * LLVORBIS_CLIP_MAX_CHANNELS; +const size_t LLVORBIS_CLIP_MAX_SAMPLE_DATA             = LLVORBIS_CLIP_MAX_SAMPLES * 2; // 2 = 16-bit +  +// Treat anything this long as a bad asset. A little fudge factor at the end: +// Make that a lot of fudge factor. We're allowing 30 sec for now - 3x legal upload +const size_t LLVORBIS_CLIP_REJECT_SAMPLES              = LLVORBIS_CLIP_MAX_SAMPLES * 3; +const size_t LLVORBIS_CLIP_REJECT_SIZE                 = LLVORBIS_CLIP_MAX_SAMPLE_DATA * 3;  S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& error_msg);  S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname); diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp index 24391eb8f3..3dd54b4760 100644 --- a/indra/llcharacter/llbvhloader.cpp +++ b/indra/llcharacter/llbvhloader.cpp @@ -91,7 +91,9 @@ const char *LLBVHLoader::ST_NO_XLT_EASEIN		= "Can't get easeIn values.";  const char *LLBVHLoader::ST_NO_XLT_EASEOUT	= "Can't get easeOut values.";  const char *LLBVHLoader::ST_NO_XLT_HAND		= "Can't get hand morph value.";  const char *LLBVHLoader::ST_NO_XLT_EMOTE		= "Can't read emote name."; +const char *LLBVHLoader::ST_BAD_ROOT        = "Illegal ROOT joint.";  */ +  //------------------------------------------------------------------------  // find_next_whitespace()  //------------------------------------------------------------------------ @@ -777,6 +779,17 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 &  			return E_ST_NO_NAME;  		} +		//--------------------------------------------------------------- +		// we require the root joint be "hip" - DEV-26188 +		//--------------------------------------------------------------- +		const char* FORCED_ROOT_NAME = "hip"; +		if ( (mJoints.size() == 0 ) && ( !strstr(jointName, FORCED_ROOT_NAME) ) ) +		{ +			strncpy(error_text, line.c_str(), 127);	/* Flawfinder: ignore */ +			return E_ST_BAD_ROOT; +		} + +		  		//----------------------------------------------------------------  		// add a set of keyframes for this joint  		//---------------------------------------------------------------- diff --git a/indra/llcharacter/llbvhloader.h b/indra/llcharacter/llbvhloader.h index ecdfc95478..85ab035e61 100644 --- a/indra/llcharacter/llbvhloader.h +++ b/indra/llcharacter/llbvhloader.h @@ -216,7 +216,8 @@ typedef enum e_load_status  		E_ST_NO_XLT_EASEIN,  		E_ST_NO_XLT_EASEOUT,  		E_ST_NO_XLT_HAND, -		E_ST_NO_XLT_EMOTE +		E_ST_NO_XLT_EMOTE, +		E_ST_BAD_ROOT  	} ELoadStatus;  //------------------------------------------------------------------------ @@ -235,7 +236,7 @@ public:  /*	  	// Status Codes -	typedef const char *Status; +	typedef const char *status_t;  	static const char *ST_OK;  	static const char *ST_EOF;  	static const char *ST_NO_CONSTRAINT; @@ -267,6 +268,7 @@ public:  	static const char *ST_NO_XLT_EASEOUT;  	static const char *ST_NO_XLT_HAND;  	static const char *ST_NO_XLT_EMOTE; +	static const char *ST_BAD_ROOT;  */  	// Loads the specified translation table.  	ELoadStatus loadTranslationTable(const char *fileName); @@ -325,6 +327,7 @@ protected:  	BOOL				mInitialized;  	ELoadStatus			mStatus; +  	// computed values  	F32	mDuration;  }; diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp index 4ee29fe100..83e4e35b00 100644 --- a/indra/llcharacter/llgesture.cpp +++ b/indra/llcharacter/llgesture.cpp @@ -304,7 +304,7 @@ BOOL LLGestureList::trigger(KEY key, MASK mask)  		}  		else  		{ -			llwarns << "NULL gesture in gesture list (" << i << ")" << llendl +			llwarns << "NULL gesture in gesture list (" << i << ")" << llendl;  		}  	}  	return FALSE; diff --git a/indra/llcharacter/lljointsolverrp3.cpp b/indra/llcharacter/lljointsolverrp3.cpp index 0ea92a2d77..6599a76b16 100644 --- a/indra/llcharacter/lljointsolverrp3.cpp +++ b/indra/llcharacter/lljointsolverrp3.cpp @@ -211,7 +211,7 @@ void LLJointSolverRP3::solve()  	//-------------------------------------------------------------------------  	LLVector3 abacCompOrthoVec = abVec - acVec * ((abVec * acVec)/(acVec * acVec)); -//	llinfos << "abacCompOrthoVec : " << abacCompOrthoVec << llendl +//	llinfos << "abacCompOrthoVec : " << abacCompOrthoVec << llendl;  	//-------------------------------------------------------------------------  	// compute the normal of the original ABC plane (and store for later) diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index 6794be4904..37e922d4b7 100644 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -239,7 +239,7 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;  */  #define lllog(level, broadTag, narrowTag, once) \ -	{ \ +	do { \  		static LLError::CallSite _site( \  			level, __FILE__, __LINE__, typeid(_LL_CLASS_TO_LOG), __FUNCTION__, broadTag, narrowTag, once);\  		if (_site.shouldLog()) \ @@ -252,7 +252,7 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;  			LLError::End(); \  			LLError::Log::flush(_out, _site); \  		} \ -	} +	} while(0)  // DEPRECATED: Use the new macros that allow tags and *look* like macros.  #define lldebugs	lllog(LLError::LEVEL_DEBUG, NULL, NULL, false) diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 8f70726a9e..eca7e922fd 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -34,6 +34,7 @@  #define LL_LLSTRING_H  #include <string> +#include <cstdio>  #include <locale>  #include <iomanip>  #include "llsd.h" diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 4d03c4d40d..4737421289 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -124,9 +124,42 @@ LLOSInfo::LLOSInfo() :  			}  			else if(osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0)  			{ -				 if(osvi.wProductType == VER_NT_WORKSTATION) -					mOSStringSimple = "Microsoft Windows Vista "; -				 else mOSStringSimple = "Microsoft Windows Vista Server "; +				///get native system info if available.. +				typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO); ///function pointer for loading GetNativeSystemInfo +				SYSTEM_INFO si; //System Info object file contains architecture info +				PGNSI pGNSI; //pointer object +				ZeroMemory(&si, sizeof(SYSTEM_INFO)); //zero out the memory in information +				pGNSI = (PGNSI) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")),  "GetNativeSystemInfo"); //load kernel32 get function +				if(NULL != pGNSI) //check if it has failed +					pGNSI(&si); //success +				else  +					GetSystemInfo(&si); //if it fails get regular system info  +				//(Warning: If GetSystemInfo it may result in incorrect information in a WOW64 machine, if the kernel fails to load) + +				//msdn microsoft finds 32 bit and 64 bit flavors this way.. +				//http://msdn.microsoft.com/en-us/library/ms724429(VS.85).aspx (example code that contains quite a few more flavors +				//of windows than this code does (in case it is needed for the future) +				if ( si.wProcessorArchitecture==PROCESSOR_ARCHITECTURE_AMD64 ) //check for 64 bit +				{ +					 if(osvi.wProductType == VER_NT_WORKSTATION) +						mOSStringSimple = "Microsoft Windows Vista 64-bit "; +					 else  +						mOSStringSimple = "Microsoft Windows Vista Server 64-bit "; +				} +				else if (si.wProcessorArchitecture==PROCESSOR_ARCHITECTURE_INTEL ) +				{ +					 if(osvi.wProductType == VER_NT_WORKSTATION) +						mOSStringSimple = "Microsoft Windows Vista 32-bit "; +					 else  +						mOSStringSimple = "Microsoft Windows Vista Server 32-bit "; +				} +				else // PROCESSOR_ARCHITECTURE_IA64 || PROCESSOR_ARCHITECTURE_UNKNOWN not checked +				{ +					 if(osvi.wProductType == VER_NT_WORKSTATION) +						mOSStringSimple = "Microsoft Windows Vista "; +					 else  +						mOSStringSimple = "Microsoft Windows Vista Server "; +				}  			}  			else   // Use the registry on early versions of Windows NT.  			{ diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 488f3bf78d..9bbc55509d 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -159,7 +159,7 @@ U8* LLImageBase::allocateData(S32 size)  		size = mWidth * mHeight * mComponents;  		if (size <= 0)  		{ -			llerrs << llformat("LLImageBase::allocateData called with bad dimentions: %dx%dx%d",mWidth,mHeight,mComponents) << llendl; +			llerrs << llformat("LLImageBase::allocateData called with bad dimensions: %dx%dx%d",mWidth,mHeight,mComponents) << llendl;  		}  	}  	else if (size <= 0 || (size > 4096*4096*16 && sSizeOverride == FALSE)) diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index e48690908e..f208d82084 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -706,7 +706,6 @@ void LLParcel::packMessage(LLSD& msg)  	msg["category"] = (U8)mCategory;  	msg["auth_buyer_id"] = mAuthBuyerID;  	msg["snapshot_id"] = mSnapshotID; -	msg["snapshot_id"] = mSnapshotID;  	msg["user_location"] = ll_sd_from_vector3(mUserLocation);  	msg["user_look_at"] = ll_sd_from_vector3(mUserLookAt);  	msg["landing_type"] = (U8)mLandingType; diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 5cc0a596fd..b8ef92f9a9 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -4273,7 +4273,7 @@ LLFaceID LLVolume::generateFaceMask()  		}  		break;  	default: -		llerrs << "Unknown profile!" << llendl +		llerrs << "Unknown profile!" << llendl;  		break;  	} diff --git a/indra/llmessage/lltemplatemessagebuilder.cpp b/indra/llmessage/lltemplatemessagebuilder.cpp index e6419807ff..6400310c46 100644 --- a/indra/llmessage/lltemplatemessagebuilder.cpp +++ b/indra/llmessage/lltemplatemessagebuilder.cpp @@ -728,9 +728,9 @@ static S32 buildBlock(U8* buffer, S32 buffer_size, const LLMessageBlock* templat  					    // out gracefully from this function. XXXTBD  						llerrs << "buildBlock failed. "  							<< "Attempted to pack " -							<< result + mvci.getSize() +							<< (result + mvci.getSize())  							<< " bytes into a buffer with size " -							<< buffer_size << "." << llendl +							<< buffer_size << "." << llendl;  					}						  				}  			} diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index 8c9eb7ed42..6682575ca5 100644 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -678,12 +678,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender  						// default to 0s.  						U32 size = mvci.getSize(); -						std::vector<U8> data(size); -						if(size) -						{ -							// Nonsense test to get past GCC 4.3.1 bug with -O3 -							memset(&(data[0]), 0, size); -						} +						std::vector<U8> data(size, 0);  						cur_data_block->addData(mvci.getName(), &(data[0]),   												size, mvci.getType());  					} diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index aac650bec9..5c13df9f81 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -9,6 +9,7 @@ include(LLCommon)  include(LLImage)  include(LLMath)  include(LLRender) +include(LLVFS)  include(LLWindow)  include(LLXML)  include(LLVFS) @@ -19,6 +20,7 @@ include_directories(      ${LLIMAGE_INCLUDE_DIRS}      ${LLMATH_INCLUDE_DIRS}      ${LLRENDER_INCLUDE_DIRS} +    ${LLVFS_INCLUDE_DIRS}      ${LLWINDOW_INCLUDE_DIRS}      ${LLXML_INCLUDE_DIRS}      ${LLVFS_INCLUDE_DIRS} diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp index 754d90c854..08a96b4e31 100644 --- a/indra/llrender/llcubemap.cpp +++ b/indra/llrender/llcubemap.cpp @@ -106,7 +106,7 @@ void LLCubeMap::initGL()  	}  	else  	{ -		llwarns << "Using cube map without extension!" << llendl +		llwarns << "Using cube map without extension!" << llendl;  	}  } diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index 44e997340e..1246cfc44b 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -364,7 +364,7 @@ BOOL LLFontFreetype::addChar(llwchar wch) const  	glyph_index = FT_Get_Char_Index(mFTFace, wch);  	if (glyph_index == 0)  	{ -		//llinfos << "Trying to add glyph from fallback font!" << llendl +		//llinfos << "Trying to add glyph from fallback font!" << llendl;  		font_vector_t::const_iterator iter;  		for(iter = mFallbackFonts.begin(); iter != mFallbackFonts.end(); iter++)  		{ @@ -534,11 +534,10 @@ void LLFontFreetype::renderGlyph(U32 glyph_index) const  void LLFontFreetype::reset(F32 vert_dpi, F32 horz_dpi)  {  	resetBitmapCache();  +	loadFace(mName, mPointSize, vert_dpi ,horz_dpi, mFontBitmapCachep->getNumComponents(), mIsFallback);  	if (!mIsFallback)  	{  		// This is the head of the list - need to rebuild ourself and all fallbacks. -		loadFace(mName, mPointSize, vert_dpi ,horz_dpi, mFontBitmapCachep->getNumComponents(), mIsFallback); -  		if (mFallbackFonts.empty())  		{  			llwarns << "LLFontGL::reset(), no fallback fonts present" << llendl; diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index f7bab3de67..2d7b9760e8 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -44,6 +44,7 @@  #include "llstl.h"  #include "v4color.h"  #include "lltexture.h" +#include "lldir.h"  // Third party library includes  #include <boost/tokenizer.hpp> diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h index c7178a5552..f33ae7d8f0 100644 --- a/indra/llrender/llglheaders.h +++ b/indra/llrender/llglheaders.h @@ -53,8 +53,6 @@  #   include "GL/glxext.h"  //#   define  GLH_EXT_GET_PROC_ADDRESS(p) glXGetProcAddressARB((const GLubyte*)(p))  #   define  GLH_EXT_GET_PROC_ADDRESS(p) glXGetProcAddress((const GLubyte*)(p)) -//  the X headers define 'Status'.  Undefine to avoid confusion. -#undef Status  // The __APPLE__ kludge is to make glh_extensions.h not symbol-clash horribly  // This header is distributed with SL.  You'll find it in linden/libraries/include/GL/ @@ -277,8 +275,6 @@ extern PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT;  // Use glXGetProcAddressARB instead of glXGetProcAddress - the ARB symbol  // is considered 'legacy' but works on more machines.  # define GLH_EXT_GET_PROC_ADDRESS(p) glXGetProcAddressARB((const GLubyte*)(p)) -// Whee, the X headers define 'Status'.  Undefine to avoid confusion. -#undef Status  #endif // LL_LINUX && !LL_MESA_HEADLESS  #if LL_LINUX && defined(WINGDIAPI) diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index dd64d753c7..e5fea5b995 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -428,7 +428,7 @@ void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents)  		// Check if dimensions are a power of two!  		if (!checkSize(width,height))  		{ -			llerrs << llformat("Texture has non power of two dimention: %dx%d",width,height) << llendl; +			llerrs << llformat("Texture has non power of two dimension: %dx%d",width,height) << llendl;  		}  		if (mTexName) diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 693ea5bb45..0db515ab41 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -148,6 +148,7 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)  	mBgImage( p.background_image ),  	mBgImageDisabled( p.background_image_disabled ),  	mBgImageFocused( p.background_image_focused ), +	mHaveHistory(FALSE),  	mReplaceNewlinesWithSpaces( TRUE ),  	mLabel(p.label),  	mCursorColor(p.cursor_color()), @@ -164,13 +165,8 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)  	mTripleClickTimer.reset();  	setText(p.default_text()); -	// line history support: -	// - initialize line history list -	mLineHistory.insert( mLineHistory.end(), "" ); -	// - disable line history by default -	mHaveHistory = FALSE; -	// - reset current history line pointer -	mCurrentHistoryLine = 0; +	// Initialize current history line iterator +	mCurrentHistoryLine = mLineHistory.begin();  	LLRect border_rect(getLocalRect());  	// adjust for gl line drawing glitch @@ -278,16 +274,31 @@ void LLLineEditor::updateHistory()  	// reset current history line number.  	// Be sure only to remember lines that are not empty and that are  	// different from the last on the list. -	if( mHaveHistory && mText.length() && ( mLineHistory.empty() || getText() != mLineHistory.back() ) ) +	if( mHaveHistory && getLength() )  	{ -		// discard possible empty line at the end of the history -		// inserted by setText() -		if( !mLineHistory.back().length() ) +		if( !mLineHistory.empty() )  		{ -			mLineHistory.pop_back(); +			// When not empty, last line of history should always be blank. +			if( mLineHistory.back().empty() ) +			{ +				// discard the empty line +				mLineHistory.pop_back(); +			} +			else +			{ +				LL_WARNS("") << "Last line of history was not blank." << LL_ENDL; +			}  		} -		mLineHistory.insert( mLineHistory.end(), getText() ); -		mCurrentHistoryLine = mLineHistory.size() - 1; + +		// Add text to history, ignoring duplicates +		if( mLineHistory.empty() || getText() != mLineHistory.back() ) +		{ +			mLineHistory.push_back( getText() ); +		} + +		// Restore the blank line and set mCurrentHistoryLine to point at it +		mLineHistory.push_back( "" ); +		mCurrentHistoryLine = mLineHistory.end() - 1;  	}  } @@ -357,11 +368,8 @@ void LLLineEditor::setText(const LLStringExplicit &new_text)  	}  	setCursor(llmin((S32)mText.length(), getCursor())); -	// Newly set text goes always in the last line of history. -	// Possible empty strings (as with chat line) will be deleted later. -	mLineHistory.insert( mLineHistory.end(), new_text );  	// Set current history line to end of history. -	mCurrentHistoryLine = mLineHistory.size() - 1; +	mCurrentHistoryLine = mLineHistory.end() - 1;  	mPrevText = mText;  } @@ -1254,9 +1262,9 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)  	case KEY_UP:  		if( mHaveHistory && ( MASK_CONTROL == mask ) )  		{ -			if( mCurrentHistoryLine > 0 ) +			if( mCurrentHistoryLine > mLineHistory.begin() )  			{ -				mText.assign( mLineHistory[ --mCurrentHistoryLine ] ); +				mText.assign( *(--mCurrentHistoryLine) );  				setCursor(llmin((S32)mText.length(), getCursor()));  			}  			else @@ -1271,9 +1279,9 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)  	case KEY_DOWN:  		if( mHaveHistory  && ( MASK_CONTROL == mask ) )  		{ -			if( !mLineHistory.empty() && mCurrentHistoryLine < mLineHistory.size() - 1 ) +			if( !mLineHistory.empty() && mCurrentHistoryLine < mLineHistory.end() - 1 )  			{ -				mText.assign( mLineHistory[ ++mCurrentHistoryLine ] ); +				mText.assign( *(++mCurrentHistoryLine) );  				setCursor(llmin((S32)mText.length(), getCursor()));  			}  			else @@ -2291,14 +2299,20 @@ BOOL LLLineEditor::hasPreeditString() const  void LLLineEditor::resetPreedit()  { -	if (hasPreeditString()) +	if (hasSelection())  	{ -		if (hasSelection()) +		if (hasPreeditString())  		{  			llwarns << "Preedit and selection!" << llendl;  			deselect();  		} - +		else +		{ +			deleteSelection(); +		} +	} +	if (hasPreeditString()) +	{  		const S32 preedit_pos = mPreeditPositions.front();  		mText.erase(preedit_pos, mPreeditPositions.back() - preedit_pos);  		mText.insert(preedit_pos, mPreeditOverwrittenWString); diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 48d68b9935..6e81969f00 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -286,8 +286,9 @@ protected:  	// line history support:  	BOOL		mHaveHistory;				// flag for enabled line history -	std::vector<std::string> mLineHistory;		// line history storage -	U32			mCurrentHistoryLine;		// currently browsed history line +	typedef std::vector<std::string>	line_history_t; +	line_history_t	mLineHistory;			// line history storage +	line_history_t::iterator	mCurrentHistoryLine;	// currently browsed history line  	LLViewBorder* mBorder;  	const LLFontGL*	mGLFont; diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 14bee0465c..cf013efca0 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -279,47 +279,7 @@ BOOL LLMenuItemGL::addToAcceleratorList(std::list <LLKeyBinding*> *listp)  // the current accelerator key and mask to the provided string.  void LLMenuItemGL::appendAcceleratorString( std::string& st ) const  { -	// break early if this is a silly thing to do. -	if( KEY_NONE == mAcceleratorKey ) -	{ -		return; -	} - -	// Append any masks -#ifdef LL_DARWIN -	// Standard Mac names for modifier keys in menu equivalents -	// We could use the symbol characters, but they only exist in certain fonts. -	if( mAcceleratorMask & MASK_CONTROL ) -	{ -		if ( mAcceleratorMask & MASK_MAC_CONTROL ) -		{ -			st.append( "Ctrl-" ); -		} -		else -		{ -			st.append( "Cmd-" );		// Symbol would be "\xE2\x8C\x98" -		} -	} -	if( mAcceleratorMask & MASK_ALT ) -		st.append( "Opt-" );		// Symbol would be "\xE2\x8C\xA5" -	if( mAcceleratorMask & MASK_SHIFT ) -		st.append( "Shift-" );		// Symbol would be "\xE2\x8C\xA7" -#else -	if( mAcceleratorMask & MASK_CONTROL ) -		st.append( "Ctrl-" ); -	if( mAcceleratorMask & MASK_ALT ) -		st.append( "Alt-" ); -	if( mAcceleratorMask & MASK_SHIFT ) -		st.append( "Shift-" ); -#endif - -	std::string keystr = LLKeyboard::stringFromKey( mAcceleratorKey ); -	if ((mAcceleratorMask & MASK_NORMALKEYS) && -		(keystr[0] == '-' || keystr[0] == '=')) -	{ -		st.append( " " ); -	} -	st.append( keystr ); +	st = LLKeyboard::stringFromAccelerator( mAcceleratorMask, mAcceleratorKey );  	LL_DEBUGS("HotKeys") << "appendAcceleratorString: " << st << LL_ENDL;  } diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp index a4e23a605b..ed870d46d5 100644 --- a/indra/llui/llresmgr.cpp +++ b/indra/llui/llresmgr.cpp @@ -279,6 +279,14 @@ std::string LLResMgr::getMonetaryString( S32 input ) const  void LLResMgr::getIntegerString( std::string& output, S32 input ) const  { +	// handle special case of input value being zero +	if (input == 0) +	{ +		output = "0"; +		return; +	} +	 +	// *NOTE: this method does not handle negative input integers correctly  	S32 fraction = 0;  	std::string fraction_string;  	S32 remaining_count = input; diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h index aedeca27cb..195f21a6a7 100644 --- a/indra/llui/lluistring.h +++ b/indra/llui/lluistring.h @@ -51,9 +51,9 @@  // llinfos << mMessage.getString() << llendl; // outputs "Welcome Steve to Second Life"  // mMessage.setArg("[USERNAME]", "Joe");  // llinfos << mMessage.getString() << llendl; // outputs "Welcome Joe to Second Life" -// mMessage = "Recepci￳n a la [SECONDLIFE] [USERNAME]" +// mMessage = "Bienvenido a la [SECONDLIFE] [USERNAME]"  // mMessage.setArg("[SECONDLIFE]", "Segunda Vida"); -// llinfos << mMessage.getString() << llendl; // outputs "Recepci￳n a la Segunda Vida Joe" +// llinfos << mMessage.getString() << llendl; // outputs "Bienvenido a la Segunda Vida Joe"  // Implementation Notes:  // Attempting to have operator[](const std::string& s) return mArgs[s] fails because we have diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt index cc0297e3dc..0de3fa33f9 100644 --- a/indra/llvfs/CMakeLists.txt +++ b/indra/llvfs/CMakeLists.txt @@ -23,6 +23,7 @@ set(llvfs_HEADER_FILES      CMakeLists.txt      lldir.h +    lldirguard.h      lllfsthread.h      llpidlock.h      llvfile.h diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 745e53c980..781321e5e4 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -404,6 +404,12 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd  		prefix = getExecutableDir();  		break; +	case LL_PATH_FONTS: +		prefix = getAppRODataDir(); +		prefix += mDirDelimiter; +		prefix += "fonts"; +		break; +		  	default:  		llassert(0);  	} @@ -419,6 +425,11 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd  		filename = subdir1 + mDirDelimiter + filename;  	} +	if (prefix.empty()) +	{ +		llwarns << "prefix is empty, possible bad filename" << llendl; +	} +	  	std::string expanded_filename;  	if (!filename.empty())  	{ @@ -673,11 +684,6 @@ void LLDir::dumpCurrentDirectories()  	LL_DEBUGS2("AppInit","Directories") << "  CAFile:				 " << getCAFile() << LL_ENDL;  	LL_DEBUGS2("AppInit","Directories") << "  SkinBaseDir:           " << getSkinBaseDir() << LL_ENDL;  	LL_DEBUGS2("AppInit","Directories") << "  SkinDir:               " << getSkinDir() << LL_ENDL; - -#if LL_LIBXUL_ENABLED - 	LL_DEBUGS2("AppInit","Directories") << "  HTML Path:             " << getExpandedFilename( LL_PATH_HTML, "" ) << llendl; - 	LL_DEBUGS2("AppInit","Directories") << "  Mozilla Profile Path:  " << getExpandedFilename( LL_PATH_MOZILLA_PROFILE, "" ) << llendl; -#endif  } diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index 6c9fea6b6a..07c814769e 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -60,6 +60,7 @@ typedef enum ELLPath  //	LL_PATH_HTML = 16,  	LL_PATH_EXECUTABLE = 16,  	LL_PATH_DEFAULT_SKIN = 17, +	LL_PATH_FONTS = 18,  	LL_PATH_LAST  } ELLPath; diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index 346f7dd8ed..7bc6f63e1f 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -68,7 +68,8 @@ static void CFStringRefToLLString(CFStringRef stringRef, std::string &llString,  {  	if (stringRef)  	{ -		long	bufferSize = CFStringGetLength(stringRef) + 1; +		long stringSize = CFStringGetLength(stringRef) + 1; +		long bufferSize = CFStringGetMaximumSizeForEncoding(stringSize,kCFStringEncodingUTF8);  		char* buffer = new char[bufferSize];  		memset(buffer, 0, bufferSize);  		if (CFStringGetCString(stringRef, buffer, bufferSize, kCFStringEncodingUTF8)) diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp index 3e302764de..4c376f11a5 100644 --- a/indra/llvfs/lldir_win32.cpp +++ b/indra/llvfs/lldir_win32.cpp @@ -121,17 +121,22 @@ LLDir_Win32::LLDir_Win32()  	GetCurrentDirectory(MAX_PATH, w_str);  	mExecutableDir = utf16str_to_utf8str(llutf16string(w_str));  #endif -	 -	// When running in a dev tree, app_settings is under indra/newview/ -	// but in production it is under Program Files/SecondLife/ -	// Attempt to detect which one we're using. JC -	if (mExecutableDir.find("indra") != std::string::npos) -		mAppRODataDir = getCurPath(); -	else -		mAppRODataDir = mExecutableDir; + +	mAppRODataDir = ".";	  	mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; +	if (mExecutableDir.find("indra") == std::string::npos) +	{ +		// Running from installed directory.  Make sure current +		// directory isn't something crazy (e.g. if invoking from +		// command line). +		SetCurrentDirectory(utf8str_to_utf16str(mExecutableDir).c_str()); +		GetCurrentDirectory(MAX_PATH, w_str); +		mWorkingDir = utf16str_to_utf8str(llutf16string(w_str)); +	} +	llinfos << "mAppRODataDir = " << mAppRODataDir << llendl; +  	// Build the default cache directory  	mDefaultCacheDir = buildSLOSCacheDir(); diff --git a/indra/llvfs/lldirguard.h b/indra/llvfs/lldirguard.h new file mode 100644 index 0000000000..85366120d8 --- /dev/null +++ b/indra/llvfs/lldirguard.h @@ -0,0 +1,78 @@ +/**  + * @file lldirguard.h + * @brief Protect working directory from being changed in scope. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + *  + * Copyright (c) 2009, Linden Research, Inc. + *  + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab.  Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + *  + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + *  + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + *  + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_DIRGUARD_H +#define LL_DIRGUARD_H + +#include "linden_common.h" +#include "llerror.h" + +#if LL_WINDOWS +class LLDirectoryGuard +{ +public: +	LLDirectoryGuard() +	{ +		mOrigDirLen = GetCurrentDirectory(MAX_PATH, mOrigDir); +	} + +	~LLDirectoryGuard() +	{ +		mFinalDirLen = GetCurrentDirectory(MAX_PATH, mFinalDir); +		if ((mOrigDirLen!=mFinalDirLen) || +			(wcsncmp(mOrigDir,mFinalDir,mOrigDirLen)!=0)) +		{ +			// Dir has changed +			std::string mOrigDirUtf8 = utf16str_to_utf8str(llutf16string(mOrigDir)); +			std::string mFinalDirUtf8 = utf16str_to_utf8str(llutf16string(mFinalDir)); +			llinfos << "Resetting working dir from " << mFinalDirUtf8 << " to " << mOrigDirUtf8 << llendl; +			SetCurrentDirectory(mOrigDir); +		} +	} + +private: +	TCHAR mOrigDir[MAX_PATH]; +	DWORD mOrigDirLen; +	TCHAR mFinalDir[MAX_PATH]; +	DWORD mFinalDirLen; +}; +#else // No-op outside Windows. +class LLDirectoryGuard +{ +public: +	LLDirectoryGuard() {} +	~LLDirectoryGuard() {} +}; +#endif  + + +#endif diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp index f0f618aef1..16cbf815e0 100644 --- a/indra/llwindow/llkeyboard.cpp +++ b/indra/llwindow/llkeyboard.cpp @@ -36,7 +36,6 @@  #include "llwindowcallbacks.h" -  //  // Globals  // @@ -46,6 +45,8 @@ LLKeyboard *gKeyboard = NULL;  //static  std::map<KEY,std::string> LLKeyboard::sKeysToNames;  std::map<std::string,KEY> LLKeyboard::sNamesToKeys; +LLKeyStringTranslatorFunc*	LLKeyboard::mStringTranslator = NULL;	// Used for l10n + PC/Mac/Linux accelerator labeling +  //  // Class Implementation @@ -346,6 +347,65 @@ std::string LLKeyboard::stringFromKey(KEY key)  } +//static +std::string LLKeyboard::stringFromAccelerator( MASK accel_mask, KEY key ) +{ +	std::string res; +	 +	// break early if this is a silly thing to do. +	if( KEY_NONE == key ) +	{ +		return res; +	} +	 +	LLKeyStringTranslatorFunc *trans = gKeyboard->mStringTranslator; +	 +	if( trans == NULL ) +	{ +		llerrs << "No mKeyStringTranslator" << llendl; +		return res; +	} +	 +	// Append any masks +#ifdef LL_DARWIN +	// Standard Mac names for modifier keys in menu equivalents +	// We could use the symbol characters, but they only exist in certain fonts. +	if( accel_mask & MASK_CONTROL ) +	{ +		if ( accel_mask & MASK_MAC_CONTROL ) +		{ +			res.append( trans("accel-mac-control") ); +		} +		else +		{ +			res.append( trans("accel-mac-command") );		// Symbol would be "\xE2\x8C\x98" +		} +	} +	if( accel_mask & MASK_ALT ) +		res.append( trans("accel-mac-option") );		// Symbol would be "\xE2\x8C\xA5" +	if( accel_mask & MASK_SHIFT ) +		res.append( trans("accel-mac-shift") );		// Symbol would be "\xE2\x8C\xA7" +#else +	if( accel_mask & MASK_CONTROL ) +		res.append( trans("accel-win-control") ); +	if( accel_mask & MASK_ALT ) +		res.append( trans("accel-win-alt") ); +	if( accel_mask & MASK_SHIFT ) +		res.append( trans("accel-win-shift") ); +#endif +	std::string key_string = LLKeyboard::stringFromKey(key); +	if ((accel_mask & MASK_NORMALKEYS) && +		(key_string[0] == '-' || key_string[0] == '=' || key_string[0] == '+')) +	{ +		res.append( " " ); +	} + +	std::string keystr = stringFromKey( key ); +	res.append( keystr ); +	 +	return res; +} +  //static  BOOL LLKeyboard::maskFromString(const std::string& str, MASK *mask) @@ -396,3 +456,10 @@ BOOL LLKeyboard::maskFromString(const std::string& str, MASK *mask)  		return FALSE;  	}  } + + +//static +void LLKeyboard::setStringTranslatorFunc( LLKeyStringTranslatorFunc *trans_func ) +{ +	mStringTranslator = trans_func; +} diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h index 0261bcbeb3..d545034070 100644 --- a/indra/llwindow/llkeyboard.h +++ b/indra/llwindow/llkeyboard.h @@ -47,7 +47,8 @@ enum EKeystate  };  typedef void (*LLKeyFunc)(EKeystate keystate); - +typedef std::string (LLKeyStringTranslatorFunc)(const char *label); +	  enum EKeyboardInsertMode  {  	LL_KIM_INSERT, @@ -111,7 +112,7 @@ public:  	static BOOL		maskFromString(const std::string& str, MASK *mask);		// False on failure  	static BOOL		keyFromString(const std::string& str, KEY *key);			// False on failure  	static std::string stringFromKey(KEY key); - +	static std::string stringFromAccelerator( MASK accel_mask, KEY key );  	e_numpad_distinct getNumpadDistinct() { return mNumpadDistinct; }  	void setNumpadDistinct(e_numpad_distinct val) { mNumpadDistinct = val; } @@ -119,6 +120,8 @@ public:  	F32				getKeyElapsedTime( KEY key );  // Returns time in seconds since key was pressed.  	S32				getKeyElapsedFrameCount( KEY key );  // Returns time in frames since key was pressed. +	static void		setStringTranslatorFunc( LLKeyStringTranslatorFunc *trans_func ); +	  protected:  	void 			addKeyName(KEY key, const std::string& name); @@ -136,6 +139,8 @@ protected:  	KEY				mCurTranslatedKey;  	KEY				mCurScanKey;		// Used during the scanKeyboard() +	static LLKeyStringTranslatorFunc*	mStringTranslator;	// Used for l10n + PC/Mac/Linux accelerator labeling +	  	e_numpad_distinct mNumpadDistinct;  	EKeyboardInsertMode mInsertMode; diff --git a/indra/llwindow/llkeyboardwin32.cpp b/indra/llwindow/llkeyboardwin32.cpp index ea11e0537e..35a3e7621a 100644 --- a/indra/llwindow/llkeyboardwin32.cpp +++ b/indra/llwindow/llkeyboardwin32.cpp @@ -65,7 +65,7 @@ LLKeyboardWin32::LLKeyboardWin32()  	// numpad number keys  	for (cur_char = 0x60; cur_char <= 0x69; cur_char++)  	{ -		mTranslateKeyMap[cur_char] = (KEY)('0' + (0x60 - cur_char)); +		mTranslateKeyMap[cur_char] = (KEY)('0' + (cur_char - 0x60));  	} diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 7137c93476..96e5a1b7ca 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1389,11 +1389,11 @@ void LLWindowMacOSX::setMouseClipping( BOOL b )  	if(b)  	{ -		//		llinfos << "setMouseClipping(TRUE)" << llendl +		//		llinfos << "setMouseClipping(TRUE)" << llendl;  	}  	else  	{ -		//		llinfos << "setMouseClipping(FALSE)" << llendl +		//		llinfos << "setMouseClipping(FALSE)" << llendl;  	}  	adjustCursorDecouple(); @@ -1411,7 +1411,7 @@ BOOL LLWindowMacOSX::setCursorPosition(const LLCoordWindow position)  	CGPoint newPosition; -	//	llinfos << "setCursorPosition(" << screen_pos.mX << ", " << screen_pos.mY << ")" << llendl +	//	llinfos << "setCursorPosition(" << screen_pos.mX << ", " << screen_pos.mY << ")" << llendl;  	newPosition.x = screen_pos.mX;  	newPosition.y = screen_pos.mY; diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 00a8d429ba..9f03c8f695 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -70,7 +70,7 @@ extern BOOL gDebugWindowProc;  const S32 MAX_NUM_RESOLUTIONS = 200;  // static variable for ATI mouse cursor crash work-around: -static bool ATIbug = false; +static bool ATIbug = false;   //  // LLWindowSDL @@ -219,8 +219,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,  #endif // LL_X11  #if LL_GTK -	// We MUST be the first to initialize GTK, i.e. we have to beat -	// our embedded Mozilla to the punch so that GTK doesn't get badly +	// We MUST be the first to initialize GTK so that GTK doesn't get badly  	// initialized with a non-C locale and cause lots of serious random  	// weirdness.  	ll_try_gtk_init(); @@ -674,12 +673,12 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B  	glGetIntegerv(GL_DEPTH_BITS, &depthBits);  	glGetIntegerv(GL_STENCIL_BITS, &stencilBits); -	llinfos << "GL buffer:" << llendl -        llinfos << "  Red Bits " << S32(redBits) << llendl -        llinfos << "  Green Bits " << S32(greenBits) << llendl -        llinfos << "  Blue Bits " << S32(blueBits) << llendl -	llinfos	<< "  Alpha Bits " << S32(alphaBits) << llendl -	llinfos	<< "  Depth Bits " << S32(depthBits) << llendl +	llinfos << "GL buffer:" << llendl; +        llinfos << "  Red Bits " << S32(redBits) << llendl; +        llinfos << "  Green Bits " << S32(greenBits) << llendl; +        llinfos << "  Blue Bits " << S32(blueBits) << llendl; +	llinfos	<< "  Alpha Bits " << S32(alphaBits) << llendl; +	llinfos	<< "  Depth Bits " << S32(depthBits) << llendl;  	llinfos	<< "  Stencil Bits " << S32(stencilBits) << llendl;  	GLint colorBits = redBits + greenBits + blueBits + alphaBits; @@ -2252,6 +2251,7 @@ BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)  		GtkColorSelection *colorsel = GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG(win)->colorsel);  		GdkColor color, orig_color; +		orig_color.pixel = 0;  		orig_color.red = guint16(65535 * *r);  		orig_color.green= guint16(65535 * *g);  		orig_color.blue = guint16(65535 * *b); diff --git a/indra/llxuixml/lltrans.h b/indra/llxuixml/lltrans.h index 79df5802e5..856b9e04fc 100644 --- a/indra/llxuixml/lltrans.h +++ b/indra/llxuixml/lltrans.h @@ -103,6 +103,11 @@ public:  		return findString(result, xml_desc, empty);  	} +        static std::string getKeyboardString(const char* keystring) +        { +                // These map directly - no need to specialize +                return getString( ll_safe_string(keystring) ); +        }  	// get the default args  	static const LLStringUtil::format_map_t& getDefaultArgs() diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b9e5664ff7..c402c3979a 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1025,7 +1025,7 @@ endif (DARWIN)  if (LINUX)      LIST(APPEND viewer_SOURCE_FILES llappviewerlinux.cpp)      LIST(APPEND viewer_SOURCE_FILES llappviewerlinux_api_dbus.cpp) -    LIST(APPEND CMAKE_EXE_LINKER_FLAGS -Wl,--as-needed) +    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")      set(viewer_LIBRARIES          Xinerama @@ -1113,7 +1113,9 @@ if (WINDOWS)      SOURCE_GROUP("Resource Files" FILES ${viewer_RESOURCE_FILES}) -    list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) +    if (NOT STANDALONE) +        list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) +    endif (NOT STANDALONE)	      find_library(DINPUT_LIBRARY dinput8 ${DIRECTX_LIBRARY_DIR})      find_library(DXGUID_LIBRARY dxguid ${DIRECTX_LIBRARY_DIR}) @@ -1223,8 +1225,9 @@ source_group("Character File" FILES ${viewer_CHARACTER_FILES})  set_source_files_properties(${viewer_CHARACTER_FILES}                              PROPERTIES HEADER_FILE_ONLY TRUE) - -list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) +if (NOT STANDALONE) +    list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) +endif (NOT STANDALONE)  if (WINDOWS)    file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi) diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 5d52158298..544f1c598e 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -459,6 +459,7 @@ PARCEL_FLAG_ALLOW_LANDMARK			Used with llGetParcelFlags to find if a parcel allo  PARCEL_FLAG_ALLOW_TERRAFORM			Used with llGetParcelFlags to find if a parcel allows anyone to terraform the land  PARCEL_FLAG_ALLOW_DAMAGE			Used with llGetParcelFlags to find if a parcel allows damage  PARCEL_FLAG_ALLOW_CREATE_OBJECTS	Used with llGetParcelFlags to find if a parcel allows anyone to create objects +PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS	Used with llGetParcelFlags to find if a parcel allows group members or objects to create objects  PARCEL_FLAG_USE_ACCESS_GROUP		Used with llGetParcelFlags to find if a parcel limits access to a group  PARCEL_FLAG_USE_ACCESS_LIST			Used with llGetParcelFlags to find if a parcel limits access to a list of residents  PARCEL_FLAG_USE_BAN_LIST			Used with llGetParcelFlags to find if a parcel uses a ban list diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d05fd955db..467e1e8342 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1599,7 +1599,7 @@      <key>Cursor3D</key>      <map>        <key>Comment</key> -      <string>Tread Joystick values as absolute positions (not deltas).</string> +      <string>Treat Joystick values as absolute positions (not deltas).</string>        <key>Persist</key>        <integer>1</integer>        <key>Type</key> @@ -3851,6 +3851,17 @@        <key>Value</key>        <string />      </map> +    <key>JoystickMouselookYaw</key> +    <map> +      <key>Comment</key> +        <string>Pass joystick yaw to scripts in Mouselook.</string> +      <key>Persist</key> +        <integer>1</integer> +      <key>Type</key> +        <string>Boolean</string> +      <key>Value</key> +         <integer>1</integer> +    </map>      <key>JoystickRunThreshold</key>      <map>        <key>Comment</key> @@ -4158,7 +4169,7 @@        <key>Type</key>        <string>Boolean</string>        <key>Value</key> -      <integer>0</integer> +      <integer>1</integer>      </map>      <key>LipSyncOoh</key>      <map> diff --git a/indra/newview/installers/darwin/firstlook-dmg/_DS_Store b/indra/newview/installers/darwin/firstlook-dmg/_DS_StoreBinary files differ index 6c5a3f3452..408a4d4992 100644 --- a/indra/newview/installers/darwin/firstlook-dmg/_DS_Store +++ b/indra/newview/installers/darwin/firstlook-dmg/_DS_Store diff --git a/indra/newview/installers/darwin/publicnightly-dmg/_DS_Store b/indra/newview/installers/darwin/publicnightly-dmg/_DS_StoreBinary files differ index 6a91b38d6d..b901e46b65 100644 --- a/indra/newview/installers/darwin/publicnightly-dmg/_DS_Store +++ b/indra/newview/installers/darwin/publicnightly-dmg/_DS_Store diff --git a/indra/newview/installers/darwin/releasecandidate-dmg/_DS_Store b/indra/newview/installers/darwin/releasecandidate-dmg/_DS_StoreBinary files differ index a8b757372e..309c8adaaa 100644 --- a/indra/newview/installers/darwin/releasecandidate-dmg/_DS_Store +++ b/indra/newview/installers/darwin/releasecandidate-dmg/_DS_Store diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 08681db6cb..41aeeee82a 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -330,7 +330,7 @@ LLAgent::LLAgent() :  	mLeftKey(0),  	mUpKey(0),  	mYawKey(0.f), -	mPitchKey(0), +	mPitchKey(0.f),  	mOrbitLeftKey(0.f),  	mOrbitRightKey(0.f), @@ -723,15 +723,15 @@ void LLAgent::moveYaw(F32 mag, bool reset_view)  //-----------------------------------------------------------------------------  // movePitch()  //----------------------------------------------------------------------------- -void LLAgent::movePitch(S32 direction) +void LLAgent::movePitch(F32 mag)  { -	setKey(direction, mPitchKey); +	mPitchKey = mag; -	if (direction > 0) +	if (mag > 0)  	{ -		setControlFlags(AGENT_CONTROL_PITCH_POS ); +		setControlFlags(AGENT_CONTROL_PITCH_POS);  	} -	else if (direction < 0) +	else if (mag < 0)  	{  		setControlFlags(AGENT_CONTROL_PITCH_NEG);  	} @@ -2509,10 +2509,10 @@ void LLAgent::propagate(const F32 dt)  	// handle rotation based on keyboard levels  	const F32 YAW_RATE = 90.f * DEG_TO_RAD;				// radians per second -	yaw( YAW_RATE * mYawKey * dt ); +	yaw(YAW_RATE * mYawKey * dt);  	const F32 PITCH_RATE = 90.f * DEG_TO_RAD;			// radians per second -	pitch(PITCH_RATE * (F32) mPitchKey * dt); +	pitch(PITCH_RATE * mPitchKey * dt);  	// handle auto-land behavior  	if (mAvatarObject.notNull()) @@ -2537,7 +2537,7 @@ void LLAgent::propagate(const F32 dt)  	mLeftKey = 0;  	mUpKey = 0;  	mYawKey = 0.f; -	mPitchKey = 0; +	mPitchKey = 0.f;  }  //----------------------------------------------------------------------------- @@ -3168,6 +3168,7 @@ void LLAgent::updateCamera()  				mFollowCam.copyParams(*current_cam);  				mFollowCam.setSubjectPositionAndRotation( mAvatarObject->getRenderPosition(), avatarRotationForFollowCam );  				mFollowCam.update(); +				LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true);  			}  			else  			{ @@ -4245,7 +4246,7 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL camera_ani  	{  		if(avatar_animate)  		{ -				// Remove any pitch from the avatar +			// Remove any pitch from the avatar  			LLVector3 at = mFrameAgent.getAtAxis();  			at.mV[VZ] = 0.f;  			at.normalize(); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 5ca630f8d1..b334874e6e 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -471,7 +471,7 @@ private:  	S32 			mLeftKey;  	S32				mUpKey;  	F32				mYawKey; -	S32				mPitchKey; +	F32				mPitchKey;  	//--------------------------------------------------------------------  	// Movement from user input @@ -486,7 +486,7 @@ public:  	void			moveLeftNudge(S32 direction);  	void			moveUp(S32 direction);  	void			moveYaw(F32 mag, bool reset_view = true); -	void			movePitch(S32 direction); +	void			movePitch(F32 mag);  	//--------------------------------------------------------------------  	// Orbit diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d47b994322..785179f7b3 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -686,8 +686,12 @@ bool LLAppViewer::init()  	LLUI::setupPaths();  	LLTransUtil::parseStrings("strings.xml", default_trans_args);		  	LLTransUtil::parseLanguageStrings("language_settings.xml"); -	LLWeb::initClass();			  // do this after LLUI +	 +	// LLKeyboard relies on LLUI to know what some accelerator keys are called. +	LLKeyboard::setStringTranslatorFunc( LLTrans::getKeyboardString ); +	LLWeb::initClass();			  // do this after LLUI +	  	// Provide the text fields with callbacks for opening Urls  	LLUrlAction::setOpenURLCallback(&LLWeb::loadURL);  	LLUrlAction::setOpenURLInternalCallback(&LLWeb::loadURLInternal); @@ -1802,8 +1806,18 @@ bool LLAppViewer::initConfiguration()  	gSavedSettings.setString("VersionChannelName", LL_CHANNEL);  #ifndef	LL_RELEASE_FOR_DOWNLOAD -        gSavedSettings.setBOOL("ShowConsoleWindow", TRUE); -        gSavedSettings.setBOOL("AllowMultipleViewers", TRUE); +	// provide developer build only overrides for these control variables that are not +	// persisted to settings.xml +	LLControlVariable* c = gSavedSettings.getControl("ShowConsoleWindow"); +	if (c) +	{ +		c->setValue(true, false); +	} +	c = gSavedSettings.getControl("AllowMultipleViewers"); +	if (c) +	{ +		c->setValue(true, false); +	}  #endif  	//*FIX:Mani - Set default to disabling watchdog mainloop  diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index ed291c16a8..d34bcb4a68 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -188,7 +188,7 @@ static inline BOOL do_basic_glibc_backtrace()  		for (i = 0; i < size; i++)  		{  			// the format of the StraceFile is very specific, to allow (kludgy) machine-parsing -			fprintf(StraceFile, "%-3d ", i); +			fprintf(StraceFile, "%-3lu ", (unsigned long)i);  			fprintf(StraceFile, "%-32s\t", "unknown");  			fprintf(StraceFile, "%p ", stackarray[i]);  			fprintf(StraceFile, "%s\n", strings[i]); @@ -263,7 +263,7 @@ static inline BOOL do_elfio_glibc_backtrace()  	for (btpos = 0; btpos < btsize; ++btpos)  	{  		// the format of the StraceFile is very specific, to allow (kludgy) machine-parsing -		fprintf(StraceFile, "%-3d ", btpos); +		fprintf(StraceFile, "%-3ld ", (long)btpos);  		int symidx;  		for (symidx = 0; symidx < nSymNo; ++symidx)  		{ @@ -354,7 +354,7 @@ bool LLAppViewerLinux::init()  bool LLAppViewerLinux::restoreErrorTrap()  { -	// *NOTE:Mani there is a case for implementing this or the mac. +	// *NOTE:Mani there is a case for implementing this on the mac.  	// Linux doesn't need it to my knowledge.  	return true;  } @@ -727,8 +727,26 @@ std::string LLAppViewerLinux::generateSerialNumber()  {  	char serial_md5[MD5HEX_STR_SIZE];  	serial_md5[0] = 0; +	std::string best; +	std::string uuiddir("/dev/disk/by-uuid/"); -	// TODO +	// trawl /dev/disk/by-uuid looking for a good-looking UUID to grab +	std::string this_name; +	BOOL wrap = FALSE; +	while (gDirUtilp->getNextFileInDir(uuiddir, "*", this_name, wrap)) +	{ +		if (this_name.length() > best.length() || +		    (this_name.length() == best.length() && +		     this_name > best)) +		{ +			// longest (and secondarily alphabetically last) so far +			best = this_name; +		} +	} + +	// we don't return the actual serial number, just a hash of it. +	LLMD5 md5( reinterpret_cast<const unsigned char*>(best.c_str()) ); +	md5.hex_digest(serial_md5);  	return serial_md5;  } diff --git a/indra/newview/llappviewerlinux.h b/indra/newview/llappviewerlinux.h index 365fcfeb6b..230c0dc24b 100644 --- a/indra/newview/llappviewerlinux.h +++ b/indra/newview/llappviewerlinux.h @@ -33,9 +33,12 @@  #ifndef LL_LLAPPVIEWERLINUX_H  #define LL_LLAPPVIEWERLINUX_H -#if LL_DBUS_ENABLED  extern "C" {  # include <glib.h> +} + +#if LL_DBUS_ENABLED +extern "C" {  # include <glib-object.h>  # include <dbus/dbus-glib.h>  } diff --git a/indra/newview/llappviewerlinux_api_dbus.cpp b/indra/newview/llappviewerlinux_api_dbus.cpp index ee160d0151..da67493e67 100644 --- a/indra/newview/llappviewerlinux_api_dbus.cpp +++ b/indra/newview/llappviewerlinux_api_dbus.cpp @@ -41,9 +41,9 @@ extern "C" {  #include "apr_dso.h"  } -#define DEBUGMSG(...) lldebugs << llformat(__VA_ARGS__) << llendl -#define INFOMSG(...) llinfos << llformat(__VA_ARGS__) << llendl -#define WARNMSG(...) llwarns << llformat(__VA_ARGS__) << llendl +#define DEBUGMSG(...) do { lldebugs << llformat(__VA_ARGS__) << llendl; } while(0) +#define INFOMSG(...) do { llinfos << llformat(__VA_ARGS__) << llendl; } while(0) +#define WARNMSG(...) do { llwarns << llformat(__VA_ARGS__) << llendl; } while(0)  #define LL_DBUS_SYM(REQUIRED, DBUSSYM, RTN, ...) RTN (*ll##DBUSSYM)(__VA_ARGS__) = NULL  #include "llappviewerlinux_api_dbus_syms_raw.inc" diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 2b3939d92f..1282e437f2 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -159,15 +159,7 @@ bool LLAppViewerMacOSX::initParseCommandLine(LLCommandLineParser& clp)  	clp.addOptionDesc("psn", NULL, 1, "MacOSX process serial number");  	clp.setCustomParser(parse_psn); -	// First parse the command line, not often used on the mac. -	if(clp.parseCommandLine(gArgC, gArgV) == false) -	{ -		return false; -	} -     -    // Now read in the args from arguments txt. -    // Succesive calls to clp.parse... will NOT override earlier  -    // options.  +    // First read in the args from arguments txt.      const char* filename = "arguments.txt";  	llifstream ifs(filename, llifstream::binary);  	if (!ifs.is_open()) @@ -180,7 +172,14 @@ bool LLAppViewerMacOSX::initParseCommandLine(LLCommandLineParser& clp)  	{  		return false;  	} -	 + +	// Then parse the user's command line, so that any --url arg can appear last +	// Succesive calls to clp.parse... will NOT override earlier options.  +	if(clp.parseCommandLine(gArgC, gArgV) == false) +	{ +		return false; +	} +    	  	// Get the user's preferred language string based on the Mac OS localization mechanism.  	// To add a new localization:  		// go to the "Resources" section of the project diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index f56359afc3..21e17cc207 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -369,7 +369,7 @@ void LLDrawPoolWater::shade()  	LLVector3 light_dir;  	LLColor3 light_color; -	if (gSky.getSunDirection().mV[2] > NIGHTTIME_ELEVATION_COS) 	  +	if (gSky.getSunDirection().mV[2] > LLSky::NIGHTTIME_ELEVATION_COS) 	       { 	           light_dir  = gSky.getSunDirection(); 	           light_dir.normVec(); 	 diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp index c062e6ccf2..55b7ed0c99 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloateranimpreview.cpp @@ -426,8 +426,8 @@ void LLFloaterAnimPreview::resetMotion()  	LLUUID base_id = mIDList[childGetValue("preview_base_anim").asString()];  	avatarp->deactivateAllMotions(); -	avatarp->startMotion(base_id, BASE_ANIM_TIME_OFFSET);  	avatarp->startMotion(mMotionID, 0.0f); +	avatarp->startMotion(base_id, BASE_ANIM_TIME_OFFSET);  	childSetValue("playback_slider", 0.0f);  	// Set pose @@ -638,10 +638,10 @@ void LLFloaterAnimPreview::onCommitBaseAnim(LLUICtrl* ctrl, void* data)  		BOOL paused = avatarp->areAnimationsPaused();  		// stop all other possible base motions -		avatarp->stopMotion(ANIM_AGENT_STAND, TRUE); -		avatarp->stopMotion(ANIM_AGENT_WALK, TRUE); -		avatarp->stopMotion(ANIM_AGENT_SIT, TRUE); -		avatarp->stopMotion(ANIM_AGENT_HOVER, TRUE); +		avatarp->stopMotion(previewp->mIDList["Standing"], TRUE); +		avatarp->stopMotion(previewp->mIDList["Walking"], TRUE); +		avatarp->stopMotion(previewp->mIDList["Sitting"], TRUE); +		avatarp->stopMotion(previewp->mIDList["Flying"], TRUE);  		previewp->resetMotion(); diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index da2a4d9d93..cb0d304aa0 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -33,6 +33,7 @@  #include "llviewerprecompiledheaders.h"  #include "llfloaterauction.h" +#include "llfloaterregioninfo.h"  #include "lldir.h"  #include "llgl.h" @@ -56,6 +57,7 @@  #include "llviewercontrol.h"  #include "llui.h"  #include "llrender.h" +#include "llsdutil.h"  ///----------------------------------------------------------------------------  /// Local function declarations, constants, enums, and typedefs @@ -77,7 +79,9 @@ LLFloaterAuction::LLFloaterAuction(const LLSD& key)  {  //	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_auction.xml");  	mCommitCallbackRegistrar.add("ClickSnapshot",	boost::bind(&LLFloaterAuction::onClickSnapshot, this)); -	mCommitCallbackRegistrar.add("ClickOK",		boost::bind(&LLFloaterAuction::onClickOK, this)); +	mCommitCallbackRegistrar.add("ClickSellToAnyone",		boost::bind(&LLFloaterAuction::onClickSellToAnyone, this)); +	mCommitCallbackRegistrar.add("ClickStartAuction",		boost::bind(&LLFloaterAuction::onClickStartAuction, this)); +	mCommitCallbackRegistrar.add("ClickResetParcel",		boost::bind(&LLFloaterAuction::onClickResetParcel, this));  }  // Destroys the object @@ -97,6 +101,8 @@ void LLFloaterAuction::onOpen(const LLSD& key)  void LLFloaterAuction::initialize()  { +	mParcelUpdateCapUrl.clear(); +  	mParcelp = LLViewerParcelMgr::getInstance()->getParcelSelection();  	LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();  	LLParcel* parcelp = mParcelp->getParcel(); @@ -104,10 +110,23 @@ void LLFloaterAuction::initialize()  	{  		mParcelHost = region->getHost();  		mParcelID = parcelp->getLocalID(); +		mParcelUpdateCapUrl = region->getCapability("ParcelPropertiesUpdate");  		childSetText("parcel_text", parcelp->getName());  		childEnable("snapshot_btn"); -		childEnable("ok_btn"); +		childEnable("reset_parcel_btn"); +		childEnable("start_auction_btn"); + +		LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); +		if (panel) +		{	// Only enable "Sell to Anyone" on Teen grid or if we don't know the ID yet +			U32 estate_id = panel->getEstateID(); +			childSetEnabled("sell_to_anyone_btn", (estate_id == ESTATE_TEEN || estate_id == 0)); +		} +		else +		{	// Don't have the panel up, so don't know if we're on the teen grid or not.  Default to enabling it +			childEnable("sell_to_anyone_btn"); +		}  	}  	else  	{ @@ -122,8 +141,11 @@ void LLFloaterAuction::initialize()  		}  		mParcelID = -1;  		childSetEnabled("snapshot_btn", false); -		childSetEnabled("ok_btn", false); +		childSetEnabled("reset_parcel_btn", false); +		childSetEnabled("sell_to_anyone_btn", false); +		childSetEnabled("start_auction_btn", false);  	} +  	mImageID.setNull();  	mImage = NULL;  } @@ -205,7 +227,7 @@ void LLFloaterAuction::onClickSnapshot(void* data)  }  // static -void LLFloaterAuction::onClickOK(void* data) +void LLFloaterAuction::onClickStartAuction(void* data)  {  	LLFloaterAuction* self = (LLFloaterAuction*)(data); @@ -244,11 +266,264 @@ void LLFloaterAuction::onClickOK(void* data)  	msg->sendReliable(self->mParcelHost);  	// clean up floater, and get out -	self->mImageID.setNull(); -	self->mImage = NULL; -	self->mParcelID = -1; -	self->mParcelHost.invalidate(); -	self->closeFloater(); +	self->cleanupAndClose(); +} + + +void LLFloaterAuction::cleanupAndClose() +{ +	mImageID.setNull(); +	mImage = NULL; +	mParcelID = -1; +	mParcelHost.invalidate(); +	closeFloater(); +} + + + +// static glue +void LLFloaterAuction::onClickResetParcel(void* data) +{ +	LLFloaterAuction* self = (LLFloaterAuction*)(data); +	if (self) +	{ +		self->doResetParcel(); +	} +} + + +// Reset all the values for the parcel in preparation for a sale +void LLFloaterAuction::doResetParcel() +{ +	LLParcel* parcelp = mParcelp->getParcel(); +	LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); + +	if (parcelp +		&& region +		&& !mParcelUpdateCapUrl.empty()) +	{ +		LLSD body; +		std::string empty; + +		// request new properties update from simulator +		U32 message_flags = 0x01; +		body["flags"] = ll_sd_from_U32(message_flags); + +		// Set all the default parcel properties for auction +		body["local_id"] = parcelp->getLocalID(); + +		U32 parcel_flags = PF_ALLOW_LANDMARK | +						   PF_ALLOW_FLY	| +						   PF_CREATE_GROUP_OBJECTS | +						   PF_ALLOW_ALL_OBJECT_ENTRY | +						   PF_ALLOW_GROUP_OBJECT_ENTRY | +						   PF_ALLOW_GROUP_SCRIPTS | +						   PF_RESTRICT_PUSHOBJECT | +						   PF_SOUND_LOCAL | +						   PF_ALLOW_VOICE_CHAT | +						   PF_USE_ESTATE_VOICE_CHAN; + +		body["parcel_flags"] = ll_sd_from_U32(parcel_flags); +		 +		// Build a parcel name like "Ahern (128,128) PG 4032m" +		std::ostringstream parcel_name; +		LLVector3 center_point( parcelp->getCenterpoint() ); +		center_point.snap(0);		// Get rid of fractions +		parcel_name << region->getName()  +					<< " (" +					<< (S32) center_point.mV[VX] +					<< "," +					<< (S32) center_point.mV[VY]						 +					<< ") " +					<< region->getSimAccessString() +					<< " " +					<< parcelp->getArea() +					<< "m"; + +		std::string new_name(parcel_name.str().c_str()); +		body["name"] = new_name; +		childSetText("parcel_text", new_name);	// Set name in dialog as well, since it won't get updated otherwise + +		body["sale_price"] = (S32) 0; +		body["description"] = empty; +		body["music_url"] = empty; +		body["media_url"] = empty; +		body["media_desc"] = empty; +		body["media_type"] = std::string("none/none"); +		body["media_width"] = (S32) 0; +		body["media_height"] = (S32) 0; +		body["auto_scale"] = (S32) 0; +		body["media_loop"] = (S32) 0; +		body["obscure_media"] = (S32) 0; +		body["obscure_music"] = (S32) 0; +		body["media_id"] = LLUUID::null; +		body["group_id"] = MAINTENANCE_GROUP_ID;	// Use maintenance group +		body["pass_price"] = (S32) 10;		// Defaults to $10 +		body["pass_hours"] = 0.0f; +		body["category"] = (U8) LLParcel::C_NONE; +		body["auth_buyer_id"] = LLUUID::null; +		body["snapshot_id"] = LLUUID::null; +		body["user_location"] = ll_sd_from_vector3( LLVector3::zero ); +		body["user_look_at"] = ll_sd_from_vector3( LLVector3::zero ); +		body["landing_type"] = (U8) LLParcel::L_DIRECT; + +		llinfos << "Sending parcel update to reset for auction via capability to: " +			<< mParcelUpdateCapUrl << llendl; +		LLHTTPClient::post(mParcelUpdateCapUrl, body, new LLHTTPClient::Responder()); + +		// Send a message to clear the object return time +		LLMessageSystem *msg = gMessageSystem; +		msg->newMessageFast(_PREHASH_ParcelSetOtherCleanTime); +		msg->nextBlockFast(_PREHASH_AgentData); +		msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); +		msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); +		msg->nextBlockFast(_PREHASH_ParcelData); +		msg->addS32Fast(_PREHASH_LocalID, parcelp->getLocalID()); +		msg->addS32Fast(_PREHASH_OtherCleanTime, 5);			// 5 minute object auto-return + +		msg->sendReliable(region->getHost()); + +		// Clear the access lists +		clearParcelAccessLists(parcelp, region); +	} +} + + + +void LLFloaterAuction::clearParcelAccessLists(LLParcel* parcel, LLViewerRegion* region) +{ +	if (!region || !parcel) return; + +	LLUUID transactionUUID; +	transactionUUID.generate(); + +	LLMessageSystem* msg = gMessageSystem; + +	// Clear access list +	//	parcel->mAccessList.clear(); + +	msg->newMessageFast(_PREHASH_ParcelAccessListUpdate); +	msg->nextBlockFast(_PREHASH_AgentData); +	msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); +	msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() ); +	msg->nextBlockFast(_PREHASH_Data); +	msg->addU32Fast(_PREHASH_Flags, AL_ACCESS); +	msg->addS32(_PREHASH_LocalID, parcel->getLocalID() ); +	msg->addUUIDFast(_PREHASH_TransactionID, transactionUUID); +	msg->addS32Fast(_PREHASH_SequenceID, 1);			// sequence_id +	msg->addS32Fast(_PREHASH_Sections, 0);				// num_sections + +	// pack an empty block since there will be no data +	msg->nextBlockFast(_PREHASH_List); +	msg->addUUIDFast(_PREHASH_ID,  LLUUID::null ); +	msg->addS32Fast(_PREHASH_Time, 0 ); +	msg->addU32Fast(_PREHASH_Flags,	0 ); + +	msg->sendReliable( region->getHost() ); + +	// Send message for empty ban list +	//parcel->mBanList.clear(); +	msg->newMessageFast(_PREHASH_ParcelAccessListUpdate); +	msg->nextBlockFast(_PREHASH_AgentData); +	msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); +	msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() ); +	msg->nextBlockFast(_PREHASH_Data); +	msg->addU32Fast(_PREHASH_Flags, AL_BAN); +	msg->addS32(_PREHASH_LocalID, parcel->getLocalID() ); +	msg->addUUIDFast(_PREHASH_TransactionID, transactionUUID); +	msg->addS32Fast(_PREHASH_SequenceID, 1);		// sequence_id +	msg->addS32Fast(_PREHASH_Sections, 0);			// num_sections + +	// pack an empty block since there will be no data +	msg->nextBlockFast(_PREHASH_List); +	msg->addUUIDFast(_PREHASH_ID,  LLUUID::null ); +	msg->addS32Fast(_PREHASH_Time, 0 ); +	msg->addU32Fast(_PREHASH_Flags,	0 ); + +	msg->sendReliable( region->getHost() ); +} + + + +// static - 'Sell to Anyone' clicked, throw up a confirmation dialog +void LLFloaterAuction::onClickSellToAnyone(void* data) +{ +	LLFloaterAuction* self = (LLFloaterAuction*)(data); +	if (self) +	{ +		LLParcel* parcelp = self->mParcelp->getParcel(); + +		// Do a confirmation +		S32 sale_price = parcelp->getArea();	// Selling for L$1 per meter +		S32 area = parcelp->getArea(); + +		LLSD args; +		args["LAND_SIZE"] = llformat("%d", area); +		args["SALE_PRICE"] = llformat("%d", sale_price); +		args["NAME"] = "Anyone"; + +		LLNotification::Params params("ConfirmLandSaleChange");	// Re-use existing dialog +		params.substitutions(args) +			.functor.function(boost::bind(&LLFloaterAuction::onSellToAnyoneConfirmed, self, _1, _2)); + +		params.name("ConfirmLandSaleToAnyoneChange"); +		 +		// ask away +		LLNotifications::instance().add(params); +	} +} + + +// Sell confirmation clicked +bool LLFloaterAuction::onSellToAnyoneConfirmed(const LLSD& notification, const LLSD& response)	 +{ +	S32 option = LLNotification::getSelectedOption(notification, response); +	if (option == 0) +	{ +		doSellToAnyone(); +	} + +	return false; +} + + + +// Reset all the values for the parcel in preparation for a sale +void LLFloaterAuction::doSellToAnyone() +{ +	LLParcel* parcelp = mParcelp->getParcel(); +	LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); + +	if (parcelp +		&& region +		&& !mParcelUpdateCapUrl.empty()) +	{ +		LLSD body; +		std::string empty; + +		// request new properties update from simulator +		U32 message_flags = 0x01; +		body["flags"] = ll_sd_from_U32(message_flags); + +		// Set all the default parcel properties for auction +		body["local_id"] = parcelp->getLocalID(); + +		// Set 'for sale' flag +		U32 parcel_flags = parcelp->getParcelFlags() | PF_FOR_SALE; +		// Ensure objects not included +		parcel_flags &= ~PF_FOR_SALE_OBJECTS; +		body["parcel_flags"] = ll_sd_from_U32(parcel_flags); +		 +		body["sale_price"] = parcelp->getArea();	// Sell for L$1 per square meter +		body["auth_buyer_id"] = LLUUID::null;		// To anyone + +		llinfos << "Sending parcel update to sell to anyone for L$1 via capability to: " +			<< mParcelUpdateCapUrl << llendl; +		LLHTTPClient::post(mParcelUpdateCapUrl, body, new LLHTTPClient::Responder()); + +		// clean up floater, and get out +		cleanupAndClose(); +	}  } diff --git a/indra/newview/llfloaterauction.h b/indra/newview/llfloaterauction.h index 1acc08057c..c599af782d 100644 --- a/indra/newview/llfloaterauction.h +++ b/indra/newview/llfloaterauction.h @@ -45,6 +45,8 @@  // Class which holds the functionality to start auctions.  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  class LLParcelSelection; +class LLParcel; +class LLViewerRegion;  class LLFloaterAuction : public LLFloater  { @@ -62,16 +64,28 @@ private:  	void initialize();  	static void onClickSnapshot(void* data); -	static void onClickOK(void* data); +	static void onClickResetParcel(void* data); +	static void onClickSellToAnyone(void* data);		// Sell to anyone clicked +	bool onSellToAnyoneConfirmed(const LLSD& notification, const LLSD& response);	// Sell confirmation clicked +	static void onClickStartAuction(void* data);  	/*virtual*/ BOOL postBuild(); + +	void doResetParcel(); +	void doSellToAnyone(); +	void clearParcelAccessLists( LLParcel* parcel, LLViewerRegion* region ); +	void cleanupAndClose(); +  private: +  	LLTransactionID mTransactionID;  	LLAssetID mImageID;  	LLPointer<LLViewerTexture> mImage;  	LLSafeHandle<LLParcelSelection> mParcelp;  	S32 mParcelID;  	LLHost mParcelHost; + +	std::string mParcelUpdateCapUrl;	// "ParcelPropertiesUpdate" capability  }; diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 890d863db7..ccfe7d4b64 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -69,7 +69,7 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(callback_t callback,  // Default constructor  LLFloaterAvatarPicker::LLFloaterAvatarPicker(const LLSD& key)    : LLFloater(key), -	mResultsReturned(FALSE), +	mNumResultsReturned(0),  	mCallback(NULL),  	mCallbackUserdata(NULL),  	mNearMeListComplete(FALSE), @@ -314,7 +314,7 @@ void LLFloaterAvatarPicker::find()  	getChild<LLScrollListCtrl>("SearchResults")->setCommentText(getString("searching"));  	childSetEnabled("Select", FALSE); -	mResultsReturned = FALSE; +	mNumResultsReturned = 0;  }  void LLFloaterAvatarPicker::setAllowMultiple(BOOL allow_multiple) @@ -349,9 +349,10 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*  	LLScrollListCtrl* search_results = floater->getChild<LLScrollListCtrl>("SearchResults");  	// clear "Searching" label on first results -	search_results->deleteAllItems(); - -	floater->mResultsReturned = TRUE; +	if (floater->mNumResultsReturned++ == 0) +	{ +		search_results->deleteAllItems(); +	}  	BOOL found_one = FALSE;  	S32 num_new_rows = msg->getNumberOfBlocks("Data"); diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h index f3b9aefb9c..85aacb68a5 100644 --- a/indra/newview/llfloateravatarpicker.h +++ b/indra/newview/llfloateravatarpicker.h @@ -76,7 +76,7 @@ private:  	virtual BOOL handleKeyHere(KEY key, MASK mask);  	LLUUID				mQueryID; -	BOOL				mResultsReturned; +	int				mNumResultsReturned;  	BOOL				mNearMeListComplete;  	BOOL				mCloseOnSelect; diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index e0fe87f9ae..1300103423 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -211,25 +211,16 @@ void LLFloaterGesture::buildGestureList()  			std::string key_string = LLKeyboard::stringFromKey(gesture->mKey);  			std::string buffer; +			if (gesture->mKey == KEY_NONE)  			{ -				if (gesture->mKey == KEY_NONE) -				{ -					buffer = "---"; -					key_string = "~~~";		// alphabetize to end -				} -				else -				{ -					if (gesture->mMask & MASK_CONTROL) buffer.append("Ctrl-"); -					if (gesture->mMask & MASK_ALT) buffer.append("Alt-"); -					if (gesture->mMask & MASK_SHIFT) buffer.append("Shift-"); -					if ((gesture->mMask & (MASK_CONTROL|MASK_ALT|MASK_SHIFT)) && -						(key_string[0] == '-' || key_string[0] == '=')) -					{ -						buffer.append(" "); -					} -					buffer.append(key_string); -				} +				buffer = "---"; +				key_string = "~~~";		// alphabetize to end  			} +			else +			{ +				buffer = LLKeyboard::stringFromAccelerator( gesture->mMask, gesture->mKey ); +			} +  			element["columns"][1]["column"] = "shortcut";  			element["columns"][1]["value"] = buffer;  			element["columns"][1]["font"]["name"] = "SANSSERIF"; diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index a378a511b5..c1031ee437 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -105,7 +105,7 @@ public:  // LLFloaterLand  //--------------------------------------------------------------------------- -void send_parcel_select_objects(S32 parcel_local_id, S32 return_type, +void send_parcel_select_objects(S32 parcel_local_id, U32 return_type,  								uuid_list_t* return_ids = NULL)  {  	LLMessageSystem *msg = gMessageSystem; @@ -123,7 +123,7 @@ void send_parcel_select_objects(S32 parcel_local_id, S32 return_type,  	msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID());  	msg->nextBlockFast(_PREHASH_ParcelData);  	msg->addS32Fast(_PREHASH_LocalID, parcel_local_id); -	msg->addS32Fast(_PREHASH_ReturnType, return_type); +	msg->addU32Fast(_PREHASH_ReturnType, return_type);  	// Throw all return ids into the packet.  	// TODO: Check for too many ids. diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 1ec869da73..70a3ad5252 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -143,6 +143,7 @@ BOOL LLFloaterReporter::postBuild()  	LLViewerRegion *regionp = gAgent.getRegion();  	if (regionp)  	{ +		childSetText("sim_field", regionp->getName());  		pos -= regionp->getOriginGlobal();  	}  	setPosBox(pos); diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 43d31aa30a..2d8ccd1aef 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -47,7 +47,7 @@  #include "llviewerwindow.h"  // defined in llfloaterland.cpp -void send_parcel_select_objects(S32 parcel_local_id, S32 return_type, +void send_parcel_select_objects(S32 parcel_local_id, U32 return_type,  								uuid_list_t* return_ids = NULL);  enum Badge { BADGE_OK, BADGE_NOTE, BADGE_WARN, BADGE_ERROR }; diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index b64d8ab334..e00b352c9b 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -417,6 +417,11 @@ void LLFloaterTools::refresh()  	LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount());  	childSetTextArg("prim_count", "[COUNT]", prim_count_string); +	// disable the object and prim counts if nothing selected +	bool have_selection = ! LLSelectMgr::getInstance()->getSelection()->isEmpty(); +	childSetEnabled("obj_count", have_selection); +	childSetEnabled("prim_count", have_selection); +  	// Refresh child tabs  	mPanelPermissions->refresh();  	mPanelObject->refresh(); diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index d653d44f8c..b7e8835fb8 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -49,6 +49,7 @@  #include "llfirstuse.h"  #include "llfloaterreg.h"		// getTypedInstance()  #include "llfocusmgr.h" +#include "llinventorymodel.h"  #include "lllandmarklist.h"  #include "lllineeditor.h"  #include "llregionhandle.h" @@ -57,7 +58,7 @@  #include "lltabcontainer.h"  #include "lltextbox.h"  #include "lltracker.h" -#include "llinventorymodel.h" +#include "lltrans.h"  #include "llviewerinventory.h"	// LLViewerInventoryItem  #include "llviewermenu.h"  #include "llviewerregion.h" @@ -151,7 +152,6 @@ LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)  	mFriendObserver(NULL),  	mCompletingRegionName(""),  	mWaitingForTracker(FALSE), -	mExactMatch(FALSE),  	mIsClosing(FALSE),  	mSetToUserPosition(TRUE),  	mTrackedLocation(0,0,0), @@ -903,7 +903,6 @@ void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui)  	}  	LLWorldMap::getInstance()->mIsTrackingCommit = FALSE;  	mCompletingRegionName = ""; -	mExactMatch = FALSE;  } @@ -1163,7 +1162,6 @@ void LLFloaterWorldMap::onLocationCommit()  	LLStringUtil::toLower(str);  	mCompletingRegionName = str;  	LLWorldMap::getInstance()->mIsTrackingCommit = TRUE; -	mExactMatch = FALSE;  	if (str.length() >= 3)  	{  		LLWorldMap::getInstance()->sendNamedRegionRequest(str); @@ -1418,11 +1416,10 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)  	LLScrollListCtrl *list = getChild<LLScrollListCtrl>("search_results");  	list->operateOnAll(LLCtrlListInterface::OP_DELETE); -	LLSD selected_value = list->getSelectedValue(); -  	S32 name_length = mCompletingRegionName.length(); -	BOOL match_found = FALSE; +	LLSD match; +	  	S32 num_results = 0;  	std::map<U64, LLSimInfo*>::const_iterator it;  	for (it = LLWorldMap::getInstance()->mSimInfoMap.begin(); it != LLWorldMap::getInstance()->mSimInfoMap.end(); ++it) @@ -1434,15 +1431,11 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)  		if (sim_name_lower.substr(0, name_length) == mCompletingRegionName)  		{ -			if (LLWorldMap::getInstance()->mIsTrackingCommit) +			if (sim_name_lower == mCompletingRegionName)  			{ -				if (sim_name_lower == mCompletingRegionName) -				{ -					selected_value = sim_name; -					match_found = TRUE; -				} +				match = sim_name;  			} - +			  			LLSD value;  			value["id"] = sim_name;  			value["columns"][0]["column"] = "sim_name"; @@ -1451,29 +1444,24 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)  			num_results++;  		}  	} -	 -	list->selectByValue(selected_value);  	if (found_null_sim)  	{  		mCompletingRegionName = "";  	} -	if (match_found) -	{ -		mExactMatch = TRUE; -		childSetFocus("search_results"); -		onCommitSearchResult(); -	} -	else if (!mExactMatch && num_results > 0) +	// if match found, highlight it and go +	if (!match.isUndefined())  	{ -		list->selectFirstItem(); // select first item by default +		list->selectByValue(match);  		childSetFocus("search_results");  		onCommitSearchResult();  	} -	else if (num_results == 0) + +	// if we found nothing, say "none" +	if (num_results == 0)  	{ -		list->setCommentText(std::string("None found.")); +		list->setCommentText(LLTrans::getString("worldmap_results_none_found"));  		list->operateOnAll(LLCtrlListInterface::OP_DESELECT);  	}  } diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index 6d5b7543d4..20a8e6d321 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -174,7 +174,6 @@ protected:  	std::string				mCompletingRegionName;  	std::string				mLastRegionName;  	BOOL					mWaitingForTracker; -	BOOL					mExactMatch;  	BOOL					mIsClosing;  	BOOL					mSetToUserPosition; diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 99f331d087..c2d515f158 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1654,6 +1654,8 @@ void LLFloaterIMPanel::sendMsg()  		LLWString text = mInputEditor->getConvertedText();  		if(!text.empty())  		{ +			// store sent line in history, duplicates will get filtered +			if (mInputEditor) mInputEditor->updateHistory();  			// Truncate and convert to UTF8 for transport  			std::string utf8_text = wstring_to_utf8str(text);  			utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d4a9324208..1880a574a7 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2316,6 +2316,8 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)  	LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);  	LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND); +	mItems.clear(); //adding code to clear out member Items (which means Items should not have other data here at this point) +	mDisabledItems.clear(); //adding code to clear out disabled members from previous   	if (lost_and_found_id == mUUID)  	  {  		// This is the lost+found folder. diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index b4d3f4575b..7ec8d3d003 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -131,6 +131,13 @@ BOOL LLInventoryFilter::check(LLFolderViewItem* item)  		&& (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos)  		&& ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions)  		&& (listener->getCreationDate() >= earliest && listener->getCreationDate() <= mFilterOps.mMaxDate); + +	BOOL is_folder = (dynamic_cast<LLFolderViewFolder*>(item) != NULL); +	if (is_folder && mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS) +	{ +		passed = TRUE; +	} +  	return passed;  } diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 14a8b7cb59..c99e67be3f 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -1234,9 +1234,9 @@ LLVector3 LLManipRotate::getConstraintAxis()  		else  		{  #ifndef LL_RELEASE_FOR_DOWNLOAD -			llerrs << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << llendl +			llerrs << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << llendl;  #else -			llwarns << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << llendl +			llwarns << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << llendl;  #endif  			axis.mV[0] = 1.f;  		} diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index e2281743c9..206d8428be 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -101,14 +101,13 @@ void LLPanelGroupTab::handleClickHelp()  }  LLPanelGroup::LLPanelGroup() -:	LLPanel() -	,LLGroupMgrObserver( LLUUID() ) -	,mAllowEdit(TRUE) +:	LLPanel(), +	LLGroupMgrObserver( LLUUID() ), +	mAllowEdit( TRUE )  {  	// Set up the factory callbacks.  	// Roles sub tabs  	LLGroupMgr::getInstance()->addObserver(this); -  } @@ -247,6 +246,7 @@ void LLPanelGroup::onBackBtnClick()  	}  } +  void LLPanelGroup::onBtnCreate()  {  	LLPanelGroupGeneral* panel_general = findChild<LLPanelGroupGeneral>("group_general_tab_panel"); diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 0331fad60c..a6b67d668a 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -186,7 +186,7 @@ BOOL LLPanelGroupGeneral::postBuild()  	}  	mIncompleteMemberDataStr = getString("incomplete_member_data_str"); -	 +  	// If the group_id is null, then we are creating a new group  	if (mGroupID.isNull())  	{ diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 32ed20bd56..ab2afb8056 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -1178,7 +1178,7 @@ void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data,  			else  			{  				llwarns << "Inventory item for gesture " << info->mItemUUID -						<< " is no longer in agent inventory." << llendl +						<< " is no longer in agent inventory." << llendl;  			}  		}  		else diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 19bb60b237..ac7abf1448 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1260,7 +1260,7 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32  			else  			{  				llwarns << "Inventory item for script " << info->mItemUUID -					<< " is no longer in agent inventory." << llendl +					<< " is no longer in agent inventory." << llendl;  			}  			// Find our window and close it if requested. @@ -1383,6 +1383,7 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset  	delete item_uuid;  } +  /// ---------------------------------------------------------------------------  /// LLLiveLSLEditor  /// --------------------------------------------------------------------------- @@ -2145,6 +2146,7 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**)  	}  } +  void LLLiveLSLEditor::onMonoCheckboxClicked(LLUICtrl*, void* userdata)  {  	LLLiveLSLEditor* self = static_cast<LLLiveLSLEditor*>(userdata); diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 9d7338c111..9c21faa3be 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -38,6 +38,7 @@  #include "llagent.h"  #include "llbutton.h" +#include "llcombobox.h"  #include "llfilepicker.h"  #include "llfloaterreg.h"  #include "llimagetga.h" @@ -57,6 +58,10 @@ const S32 CLIENT_RECT_VPAD = 4;  const F32 SECONDS_TO_SHOW_FILE_SAVED_MSG = 8.f; +const F32 PREVIEW_TEXTURE_MAX_ASPECT = 200.f; +const F32 PREVIEW_TEXTURE_MIN_ASPECT = 0.005f; + +  LLPreviewTexture::LLPreviewTexture(const LLSD& key)  	: LLPreview( key ),  	  mLoadingFullImage( FALSE ), @@ -65,7 +70,8 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key)  	  mIsCopyable(FALSE),  	  mUpdateDimensions(TRUE),  	  mLastHeight(0), -	  mLastWidth(0) +	  mLastWidth(0), +	  mAspectRatio(0.f)  {  	const LLInventoryItem *item = getItem();  	if(item) @@ -144,6 +150,10 @@ BOOL LLPreviewTexture::postBuild()  		}  	} +	childSetCommitCallback("combo_aspect_ratio", onAspectRatioCommit, this); +	LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio"); +	combo->setCurrentByIndex(0); +	  	return LLPreview::postBuild();  } @@ -369,8 +379,13 @@ void LLPreviewTexture::updateDimensions()  	S32 max_client_width = gViewerWindow->getWindowWidth() - horiz_pad;  	S32 max_client_height = gViewerWindow->getWindowHeight() - vert_pad; +	if (mAspectRatio > 0.f) +	{ +		client_height = llceil((F32)client_width / mAspectRatio); +	} +  	while ((client_width > max_client_width) || -	       (client_height > max_client_height ) ) +	       (client_height > max_client_height ))  	{  		client_width /= 2;  		client_height /= 2; @@ -383,12 +398,12 @@ void LLPreviewTexture::updateDimensions()  	childSetTextArg("dimensions", "[WIDTH]", llformat("%d", mImage->getFullWidth()));  	childSetTextArg("dimensions", "[HEIGHT]", llformat("%d", mImage->getFullHeight())); -	// add space for dimensions +	// add space for dimensions and aspect ratio  	S32 info_height = 0; -	LLRect dim_rect; -	childGetRect("dimensions", dim_rect); -	S32 dim_height = dim_rect.getHeight(); -	info_height += dim_height + CLIENT_RECT_VPAD; +	LLRect aspect_rect; +	childGetRect("combo_aspect_ratio", aspect_rect); +	S32 aspect_height = aspect_rect.getHeight(); +	info_height += aspect_height + CLIENT_RECT_VPAD;  	view_height += info_height;  	S32 button_height = 0; @@ -445,24 +460,96 @@ void LLPreviewTexture::updateDimensions()  	else  	{  		client_width = getRect().getWidth() - horiz_pad; -		client_height = getRect().getHeight() - vert_pad; +		if (mAspectRatio > 0) +		{ +			client_height = llround(client_width / mAspectRatio); +		} +		else +		{ +			client_height = getRect().getHeight() - vert_pad; +		}  	} -	S32 max_height = getRect().getHeight() - PREVIEW_BORDER - button_height +	S32 max_height = getRect().getHeight() - PREVIEW_BORDER - button_height   		- CLIENT_RECT_VPAD - info_height - CLIENT_RECT_VPAD - PREVIEW_HEADER_SIZE; -	S32 max_width = getRect().getWidth() - horiz_pad; -	client_height = llclamp(client_height, 1, max_height); -	client_width = llclamp(client_width, 1, max_width); +	if (mAspectRatio > 0.f) +	{ +		max_height = llmax(max_height, 1); + +		if (client_height > max_height) +		{ +			client_height = max_height; +			client_width = llround(client_height * mAspectRatio); +		} +	} +	else +	{ +		S32 max_width = getRect().getWidth() - horiz_pad; + +		client_height = llclamp(client_height, 1, max_height); +		client_width = llclamp(client_width, 1, max_width); +	}  	LLRect window_rect(0, getRect().getHeight(), getRect().getWidth(), 0);  	window_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD);  	window_rect.mBottom += PREVIEW_BORDER + button_height + CLIENT_RECT_VPAD + info_height + CLIENT_RECT_VPAD; -	mClientRect.setLeftTopAndSize(window_rect.getCenterX() - (client_width / 2), window_rect.mTop, client_width, client_height); +	mClientRect.setLeftTopAndSize(window_rect.getCenterX() - (client_width / 2), window_rect.mTop, client_width, client_height);	 +	 +	// Hide the aspect ratio label if the window is too narrow +	// Assumes the label should be to the right of the dimensions +	LLRect dim_rect, aspect_label_rect; +	childGetRect("aspect_ratio", aspect_label_rect); +	childGetRect("dimensions", dim_rect); +	childSetVisible("aspect_ratio", dim_rect.mRight < aspect_label_rect.mLeft); +} + + +// Return true if everything went fine, false if we somewhat modified the ratio as we bumped on border values +bool LLPreviewTexture::setAspectRatio(const F32 width, const F32 height) +{ +	mUpdateDimensions = TRUE; + +	// We don't allow negative width or height. Also, if height is positive but too small, we reset to default +	// A default 0.f value for mAspectRatio means "unconstrained" in the rest of the code +	if ((width <= 0.f) || (height <= F_APPROXIMATELY_ZERO)) +	{ +		mAspectRatio = 0.f; +		return false; +	} +	 +	// Compute and store the ratio +	F32 ratio = width / height; +	mAspectRatio = llclamp(ratio, PREVIEW_TEXTURE_MIN_ASPECT, PREVIEW_TEXTURE_MAX_ASPECT); +	 +	// Return false if we clamped the value, true otherwise +	return (ratio == mAspectRatio);  } +void LLPreviewTexture::onAspectRatioCommit(LLUICtrl* ctrl, void* userdata) +{	 +	LLPreviewTexture* self = (LLPreviewTexture*) userdata; +	 +	std::string ratio(ctrl->getValue().asString()); +	std::string::size_type separator(ratio.find_first_of(":/\\")); +	 +	if (std::string::npos == separator) { +		// If there's no separator assume we want an unconstrained ratio +		self->setAspectRatio( 0.f, 0.f ); +		return; +	} +	 +	F32 width, height; +	std::istringstream numerator(ratio.substr(0, separator)); +	std::istringstream denominator(ratio.substr(separator + 1)); +	numerator >> width; +	denominator >> height; +	 +	self->setAspectRatio( width, height );	 +} +  void LLPreviewTexture::loadAsset()  {  	mImage = LLViewerTextureManager::getFetchedTexture(mImageID, MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index 9ace304fa6..520626b49f 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -38,6 +38,7 @@  #include "llframetimer.h"  #include "llviewertexture.h" +class LLComboBox;  class LLImageRaw;  class LLPreviewTexture : public LLPreview @@ -71,7 +72,9 @@ public:  protected:  	void				init();  	/* virtual */ BOOL	postBuild(); - +	bool				setAspectRatio(const F32 width, const F32 height); +	static void			onAspectRatioCommit(LLUICtrl*,void* userdata); +	  private:  	void				updateDimensions();  	LLUUID						mImageID; @@ -88,6 +91,7 @@ private:  	S32 mLastHeight;  	S32 mLastWidth; +	F32 mAspectRatio;  	BOOL mUpdateDimensions;  }; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index d163ceb30e..288cf728b9 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -545,7 +545,7 @@ BOOL LLSelectMgr::removeObjectFromSelections(const LLUUID &id)  				object_found = TRUE;  				break; // must break here, may have removed multiple objects from list  			} -			else if (object->isAvatar()) +			else if (object->isAvatar() && object->getParent() && ((LLViewerObject*)object->getParent())->mID == id)  			{  				// It's possible the item being removed has an avatar sitting on it  				// So remove the avatar that is sitting on the object. diff --git a/indra/newview/llsky.cpp b/indra/newview/llsky.cpp index a49b07c5d9..de99cb86fa 100644 --- a/indra/newview/llsky.cpp +++ b/indra/newview/llsky.cpp @@ -66,6 +66,9 @@ F32 elevation_from_vector(const LLVector3 &v);  LLSky				gSky;  // ---------------- LLSky ---------------- +const F32 LLSky::NIGHTTIME_ELEVATION = -8.0f; // degrees +const F32 LLSky::NIGHTTIME_ELEVATION_COS = (F32)sin(NIGHTTIME_ELEVATION*DEG_TO_RAD); +  //////////////////////////////////////////////////////////////////////  // Construction/Destruction  ////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llsky.h b/indra/newview/llsky.h index abd4205e6c..d7796dea83 100644 --- a/indra/newview/llsky.h +++ b/indra/newview/llsky.h @@ -42,9 +42,6 @@  #include "llvosky.h"  #include "llvoground.h" -const F32 NIGHTTIME_ELEVATION			= -8.0f;	// degrees -const F32 NIGHTTIME_ELEVATION_COS		= (F32)sin(NIGHTTIME_ELEVATION*DEG_TO_RAD); -  class LLViewerCamera;  class LLVOWLSky; @@ -111,6 +108,9 @@ public:  	// Legacy stuff  	LLVector3 mSunDefaultPosition; +	static const F32 NIGHTTIME_ELEVATION;	// degrees +	static const F32 NIGHTTIME_ELEVATION_COS; +  protected:  	BOOL			mOverrideSimSunPosition; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 62435c6288..9cd3acf13e 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -977,6 +977,13 @@ bool idle_startup()  		LLFile::mkdir(gDirUtilp->getChatLogsDir());  		LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); +		// chat history must be loaded AFTER chat directories are defined. +		if (!gNoRender && gSavedPerAccountSettings.getBOOL("LogShowHistory")) +		{ +			LLFloaterChat::loadHistory(); +		} +		 +		  		//good as place as any to create user windlight directories  		std::string user_windlight_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight", ""));  		LLFile::mkdir(user_windlight_path_name.c_str());		 diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 63af170fa9..88fc7f98c0 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1371,7 +1371,7 @@ bool LLTextureFetch::createRequest(const std::string& filename, const LLUUID& id  	}  	else if (w*h*c > 0)  	{ -		// If the requester knows the dimentions of the image, +		// If the requester knows the dimensions of the image,  		// this will calculate how much data we need without having to parse the header  		desired_size = LLImageJ2C::calcDataSizeJ2C(w, h, c, desired_discard); diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index ee6ef6ffee..f65baea6ca 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -120,9 +120,8 @@ void LLViewerCamera::updateCameraLocation(const LLVector3 ¢er,  											const LLVector3 &up_direction,  											const LLVector3 &point_of_interest)  { -	// do not update if we are in build mode AND avatar didn't move -	if (LLToolMgr::getInstance()->inBuildMode()  -		&& !LLViewerJoystick::getInstance()->getCameraNeedsUpdate()) +	// do not update if avatar didn't move +	if (!LLViewerJoystick::getInstance()->getCameraNeedsUpdate())  	{  		return;  	} diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index fa82612114..b71291f834 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -688,7 +688,7 @@ static LLCachedControl<std::string> test_BrowserHomePage("BrowserHomePage", "hah  void test_cached_control()  { -#define TEST_LLCC(T, V) if((T)mySetting_##T != V) llerrs << "Fail "#T << llendl +#define do { TEST_LLCC(T, V) if((T)mySetting_##T != V) llerrs << "Fail "#T << llendl; } while(0)  	TEST_LLCC(U32, 666);  	TEST_LLCC(S32, (S32)-666);  	TEST_LLCC(F32, (F32)-666.666); diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index b919e3d1c1..b593fbfb00 100644 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -414,14 +414,41 @@ void LLViewerJoystick::agentFly(F32 inc)  }  // ----------------------------------------------------------------------------- -void LLViewerJoystick::agentRotate(F32 pitch_inc, F32 yaw_inc) +void LLViewerJoystick::agentPitch(F32 pitch_inc)  { -	LLQuaternion new_rot; -	pitch_inc = gAgent.clampPitchToLimits(-pitch_inc); -	const LLQuaternion qx(pitch_inc, gAgent.getLeftAxis()); -	const LLQuaternion qy(-yaw_inc, gAgent.getReferenceUpVector()); -	new_rot.setQuat(qx * qy); -	gAgent.rotate(new_rot); +	if (pitch_inc < 0) +	{ +		gAgent.setControlFlags(AGENT_CONTROL_PITCH_POS); +	} +	else if (pitch_inc > 0) +	{ +		gAgent.setControlFlags(AGENT_CONTROL_PITCH_NEG); +	} +	 +	gAgent.pitch(-pitch_inc); +} + +// ----------------------------------------------------------------------------- +void LLViewerJoystick::agentYaw(F32 yaw_inc) +{	 +	// Cannot steer some vehicles in mouselook if the script grabs the controls +	if (gAgent.cameraMouselook() && !gSavedSettings.getBOOL("JoystickMouselookYaw")) +	{ +		gAgent.rotate(-yaw_inc, gAgent.getReferenceUpVector()); +	} +	else +	{ +		if (yaw_inc < 0) +		{ +			gAgent.setControlFlags(AGENT_CONTROL_YAW_POS); +		} +		else if (yaw_inc > 0) +		{ +			gAgent.setControlFlags(AGENT_CONTROL_YAW_NEG); +		} + +		gAgent.yaw(-yaw_inc); +	}  }  // ----------------------------------------------------------------------------- @@ -595,12 +622,38 @@ void LLViewerJoystick::moveAvatar(bool reset)  	}  	bool is_zero = true; +	static bool button_held = false;  	if (mBtn[1] == 1)  	{ -		agentJump(); +		// If AutomaticFly is enabled, then button1 merely causes a +		// jump (as the up/down axis already controls flying) if on the +		// ground, or cease flight if already flying. +		// If AutomaticFly is disabled, then button1 toggles flying. +		if (gSavedSettings.getBOOL("AutomaticFly")) +		{ +			if (!gAgent.getFlying()) +			{ +				gAgent.moveUp(1); +			} +			else if (!button_held) +			{ +				button_held = true; +				gAgent.setFlying(FALSE); +			} +		} +		else if (!button_held) +		{ +			button_held = true; +			gAgent.setFlying(!gAgent.getFlying()); +		} +  		is_zero = false;  	} +	else +	{ +		button_held = false; +	}  	F32 axis_scale[] =  	{ @@ -758,11 +811,13 @@ void LLViewerJoystick::moveAvatar(bool reset)  		{  			if (gAgent.getFlying())  			{ -				agentRotate(eff_rx, eff_ry); +				agentPitch(eff_rx); +				agentYaw(eff_ry);  			}  			else  			{ -				agentRotate(eff_rx, 2.f * eff_ry); +				agentPitch(eff_rx); +				agentYaw(2.f * eff_ry);  			}  		}  	} @@ -771,7 +826,8 @@ void LLViewerJoystick::moveAvatar(bool reset)  		agentSlide(sDelta[X_I]);		// move sideways  		agentFly(sDelta[Y_I]);			// up/down & crouch  		agentPush(sDelta[Z_I]);			// forward/back -		agentRotate(sDelta[RX_I], sDelta[RY_I]);	// pitch & turn +		agentPitch(sDelta[RX_I]);		// pitch +		agentYaw(sDelta[RY_I]);			// turn  	}  } @@ -963,15 +1019,10 @@ bool LLViewerJoystick::toggleFlycam()  		moveFlycam(true);  	} -	else if (!LLToolMgr::getInstance()->inBuildMode()) -	{ -		moveAvatar(true); -	}  	else   	{ -		// we are in build mode, exiting from the flycam mode: since we are  -		// going to keep the flycam POV for the main camera until the avatar -		// moves, we need to track this situation. +		// Exiting from the flycam mode: since we are going to keep the flycam POV for +		// the main camera until the avatar moves, we need to track this situation.  		setCameraNeedsUpdate(false);  		setNeedsReset(true);  	} diff --git a/indra/newview/llviewerjoystick.h b/indra/newview/llviewerjoystick.h index b565ed5696..a3904bd2c3 100644 --- a/indra/newview/llviewerjoystick.h +++ b/indra/newview/llviewerjoystick.h @@ -82,8 +82,9 @@ protected:  	void agentSlide(F32 inc);  	void agentPush(F32 inc);  	void agentFly(F32 inc); -	void agentRotate(F32 pitch_inc, F32 turn_inc); -    void agentJump(); +	void agentPitch(F32 pitch_inc); +	void agentYaw(F32 yaw_inc); +	void agentJump();  	void resetDeltas(S32 axis[]);  #if LIB_NDOF  	static NDOF_HotPlugResult HotPlugAddCallback(NDOF_Device *dev); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 2b972614f1..b8e945a7b8 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1000,6 +1000,7 @@ BOOL LLViewerMediaImpl::handleMouseUp(S32 x, S32 y, MASK mask)  	return TRUE;   } +  //////////////////////////////////////////////////////////////////////////////////////////  void LLViewerMediaImpl::navigateHome()  { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index b4e0d88e79..c2def610dc 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4733,6 +4733,96 @@ class LLToolsSnapObjectXY : public view_listener_t  	}  }; +// Determine if the option to cycle between linked prims is shown +class LLToolsEnableSelectNextPart : public view_listener_t +{ +	bool handleEvent(const LLSD& userdata) +	{ +		bool new_value = (gSavedSettings.getBOOL("EditLinkedParts") && +				 !LLSelectMgr::getInstance()->getSelection()->isEmpty()); +		return new_value; +	} +}; + +// Cycle selection through linked children in selected object. +// FIXME: Order of children list is not always the same as sim's idea of link order. This may confuse +// resis. Need link position added to sim messages to address this. +class LLToolsSelectNextPart : public view_listener_t +{ +	bool handleEvent(const LLSD& userdata) +	{ +		S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); +		if (gSavedSettings.getBOOL("EditLinkedParts") && object_count) +		{ +			LLViewerObject* selected = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); +			if (selected && selected->getRootEdit()) +			{ +				bool fwd = (userdata.asString() == "next"); +				bool prev = (userdata.asString() == "previous"); +				bool ifwd = (userdata.asString() == "includenext"); +				bool iprev = (userdata.asString() == "includeprevious"); +				LLViewerObject* to_select = NULL; +				LLViewerObject::child_list_t children = selected->getRootEdit()->getChildren(); +				children.push_front(selected->getRootEdit());	// need root in the list too + +				for (LLViewerObject::child_list_t::iterator iter = children.begin(); iter != children.end(); ++iter) +				{ +					if ((*iter)->isSelected()) +					{ +						if (object_count > 1 && (fwd || prev))	// multiple selection, find first or last selected if not include +						{ +							to_select = *iter; +							if (fwd) +							{ +								// stop searching if going forward; repeat to get last hit if backward +								break; +							} +						} +						else if ((object_count == 1) || (ifwd || iprev))	// single selection or include +						{ +							if (fwd || ifwd) +							{ +								++iter; +								while (iter != children.end() && ((*iter)->isAvatar() || (ifwd && (*iter)->isSelected()))) +								{ +									++iter;	// skip sitting avatars and selected if include +								} +							} +							else // backward +							{ +								iter = (iter == children.begin() ? children.end() : iter); +								--iter; +								while (iter != children.begin() && ((*iter)->isAvatar() || (iprev && (*iter)->isSelected()))) +								{ +									--iter;	// skip sitting avatars and selected if include +								} +							} +							iter = (iter == children.end() ? children.begin() : iter); +							to_select = *iter; +							break; +						} +					} +				} + +				if (to_select) +				{ +					if (gFocusMgr.childHasKeyboardFocus(gFloaterTools)) +					{ +						gFocusMgr.setKeyboardFocus(NULL);	// force edit toolbox to commit any changes +					} +					if (fwd || prev) +					{ +						LLSelectMgr::getInstance()->deselectAll(); +					} +					LLSelectMgr::getInstance()->selectObjectOnly(to_select); +					return true; +				} +			} +		} +		return true; +	} +}; +  // in order to link, all objects must have the same owner, and the  // agent must have the ability to modify all of the objects. However,  // we're not answering that question with this method. The question @@ -7729,6 +7819,7 @@ void initialize_menus()  	view_listener_t::addMenu(new LLToolsEditLinkedParts(), "Tools.EditLinkedParts");  	view_listener_t::addMenu(new LLToolsSnapObjectXY(), "Tools.SnapObjectXY");  	view_listener_t::addMenu(new LLToolsUseSelectionForGrid(), "Tools.UseSelectionForGrid"); +	view_listener_t::addMenu(new LLToolsSelectNextPart(), "Tools.SelectNextPart");  	view_listener_t::addMenu(new LLToolsLink(), "Tools.Link");  	view_listener_t::addMenu(new LLToolsUnlink(), "Tools.Unlink");  	view_listener_t::addMenu(new LLToolsStopAllAnimations(), "Tools.StopAllAnimations"); @@ -7742,6 +7833,7 @@ void initialize_menus()  	view_listener_t::addMenu(new LLToolsSelectedScriptAction(), "Tools.SelectedScriptAction");  	view_listener_t::addMenu(new LLToolsEnableToolNotPie(), "Tools.EnableToolNotPie"); +	view_listener_t::addMenu(new LLToolsEnableSelectNextPart(), "Tools.EnableSelectNextPart");  	view_listener_t::addMenu(new LLToolsEnableLink(), "Tools.EnableLink");  	view_listener_t::addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink");  	view_listener_t::addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake"); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 1cfeec5627..d3a9e1cef8 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -219,7 +219,7 @@ const std::string upload_pick(void* data)  			args["EXTENSION"] = ext;  			args["VALIDS"] = valid_extensions;  			LLNotifications::instance().add("InvalidFileExtension", args); -			return NULL; +			return std::string();  		}  	}//end else (non-null extension) diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index acdc2c2513..1d982265ca 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -174,11 +174,28 @@ BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object)  		U32 port = region_host.getPort();  		U64 ipport = (((U64)ip) << 32) | (U64)port;  		U32 index = sIPAndPortToIndex[ipport]; - +		 +		// llinfos << "Removing object from table, local ID " << local_id << ", ip " << ip << ":" << port << llendl; +		  		U64	indexid = (((U64)index) << 32) | (U64)local_id; -		return sIndexAndLocalIDToUUID.erase(indexid) > 0 ? TRUE : FALSE; +		 +		std::map<U64, LLUUID>::iterator iter = sIndexAndLocalIDToUUID.find(indexid); +		if (iter == sIndexAndLocalIDToUUID.end()) +		{ +			return FALSE; +		} +		 +		// Found existing entry +		if (iter->second == object.getID()) +		{   // Full UUIDs match, so remove the entry +			sIndexAndLocalIDToUUID.erase(iter); +			return TRUE; +		} +		// UUIDs did not match - this would zap a valid entry, so don't erase it +		//llinfos << "Tried to erase entry where id in table ("  +		//		<< iter->second	<< ") did not match object " << object.getID() << llendl;  	} - +	  	return FALSE ;  } @@ -200,6 +217,9 @@ void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id,  	U64	indexid = (((U64)index) << 32) | (U64)local_id;  	sIndexAndLocalIDToUUID[indexid] = id; +	 +	//llinfos << "Adding object to table, full ID " << id +	//	<< ", local ID " << local_id << ", ip " << ip << ":" << port << llendl;  }  S32 gFullObjectUpdates = 0; @@ -246,8 +266,8 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,  	{  		if ( LLToolMgr::getInstance()->getCurrentTool() != LLToolPie::getInstance() )  		{ -			//llinfos << "DEBUG selecting " << objectp->mID << " "  -			//		<< objectp->mLocalID << llendl; +			// llinfos << "DEBUG selecting " << objectp->mID << " "  +			// << objectp->mLocalID << llendl;  			LLSelectMgr::getInstance()->selectObjectAndFamily(objectp);  			dialog_refresh_all();  		} @@ -294,7 +314,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,  		{  			size = mesgsys->getReceiveSize();  		} -//		llinfos << "Received terse " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl; +		// llinfos << "Received terse " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl;  	}  	else  	{ @@ -308,7 +328,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,  			size = mesgsys->getReceiveSize();  		} -//		llinfos << "Received " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl; +		// llinfos << "Received " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl;  		gFullObjectUpdates += num_objects;  	} @@ -318,7 +338,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,  	if (!regionp)  	{ -		llwarns << "Object update from unknown region!" << llendl; +		llwarns << "Object update from unknown region! " << region_handle << llendl;  		return;  	} @@ -357,7 +377,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,  			U8							compbuffer[2048];  			S32							uncompressed_length = 2048;  			S32							compressed_length; -			  			compressed_dp.reset();  			U32 flags = 0; @@ -398,7 +417,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,  								 gMessageSystem->getSenderPort());  				if (fullid.isNull())  				{ -					//llwarns << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << llendl; +					// llwarns << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << ":" << gMessageSystem->getSenderPort() << llendl;  					mNumUnknownUpdates++;  				}  			} @@ -412,7 +431,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,  							gMessageSystem->getSenderPort());  			if (fullid.isNull())  			{ -				//llwarns << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << llendl; +				// llwarns << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << llendl;  				mNumUnknownUpdates++;  			}  		} @@ -420,19 +439,43 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,  		{  			mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_FullID, fullid, i);  			mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); -		//	llinfos << "Full Update, obj " << local_id << ", global ID" << fullid << "from " << mesgsys->getSender() << llendl; +			// llinfos << "Full Update, obj " << local_id << ", global ID" << fullid << "from " << mesgsys->getSender() << llendl;  		}  		objectp = findObject(fullid);  		// This looks like it will break if the local_id of the object doesn't change  		// upon boundary crossing, but we check for region id matching later... -		if (objectp && (objectp->mLocalID != local_id)) +		// Reset object local id and region pointer if things have changed +		if (objectp &&  +			((objectp->mLocalID != local_id) || +			 (objectp->getRegion() != regionp)))  		{ +			//if (objectp->getRegion()) +			//{ +			//	llinfos << "Local ID change: Removing object from table, local ID " << objectp->mLocalID  +			//			<< ", id from message " << local_id << ", from "  +			//			<< LLHost(objectp->getRegion()->getHost().getAddress(), objectp->getRegion()->getHost().getPort()) +			//			<< ", full id " << fullid  +			//			<< ", objects id " << objectp->getID() +			//			<< ", regionp " << (U32) regionp << ", object region " << (U32) objectp->getRegion() +			//			<< llendl; +			//}  			removeFromLocalIDTable(*objectp);  			setUUIDAndLocal(fullid,  							local_id,  							gMessageSystem->getSenderIP(),  							gMessageSystem->getSenderPort()); +			 +			if (objectp->mLocalID != local_id) +			{    // Update local ID in object with the one sent from the region +				objectp->mLocalID = local_id; +			} +			 +			if (objectp->getRegion() != regionp) +			{    // Object changed region, so update it +				objectp->setRegion(regionp); +				objectp->updateRegion(regionp); // for LLVOAvatar +			}  		}  		if (!objectp) @@ -441,7 +484,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,  			{  				if (update_type == OUT_TERSE_IMPROVED)  				{ -					//	llinfos << "terse update for an unknown object:" << fullid << llendl; +					// llinfos << "terse update for an unknown object:" << fullid << llendl;  					continue;  				}  			} @@ -452,7 +495,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,  			{  				if (update_type != OUT_FULL)  				{ -// 					llinfos << "terse update for an unknown object:" << fullid << llendl; +					// llinfos << "terse update for an unknown object:" << fullid << llendl;  					continue;  				} @@ -462,7 +505,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,  			if (mDeadObjects.find(fullid) != mDeadObjects.end())  			{  				mNumDeadObjectUpdates++; -				//llinfos << "update for a dead object:" << fullid << llendl; +				// llinfos << "update for a dead object:" << fullid << llendl;  				continue;  			}  #endif @@ -475,20 +518,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,  			justCreated = TRUE;  			mNumNewObjects++;  		} -		else -		{ -			if (objectp->getRegion() != regionp) -			{ -				// Object has changed region!  Update lookup tables, set region pointer. -				removeFromLocalIDTable(*objectp); -				setUUIDAndLocal(fullid, -								local_id, -								gMessageSystem->getSenderIP(), -								gMessageSystem->getSenderPort()); -				objectp->setRegion(regionp); -			} -			objectp->updateRegion(regionp); // for LLVOAvatar -		}  		if (objectp->isDead()) @@ -623,7 +652,7 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent)  		mCurLazyUpdateIndex = 0;  	} -	mCurBin = (++mCurBin) % NUM_BINS; +	mCurBin = (mCurBin + 1) % NUM_BINS;  	LLVOAvatar::cullAvatarsByPixelArea();  } @@ -808,6 +837,14 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)  	// Remove from object map so noone can look it up.  	mUUIDObjectMap.erase(objectp->mID); +	 +	//if (objectp->getRegion()) +	//{ +	//	llinfos << "cleanupReferences removing object from table, local ID " << objectp->mLocalID << ", ip "  +	//				<< objectp->getRegion()->getHost().getAddress() << ":"  +	//				<< objectp->getRegion()->getHost().getPort() << llendl; +	//}	 +	  	removeFromLocalIDTable(*objectp);  	if (objectp->onActiveList()) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 3cc379821a..273ca8bd1a 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1502,11 +1502,6 @@ void LLViewerWindow::initWorldUI()  	//  currently needs to happen before initializing chat or IM  	LLFloaterReg::getInstance("communicate"); -	if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) -	{ -		LLFloaterChat::loadHistory(); -	} -  	LLRect morph_view_rect = full_window;  	morph_view_rect.stretch( -STATUS_BAR_HEIGHT );  	morph_view_rect.mTop = full_window.mTop - 32; diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 6401389c8f..ca028269fe 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -1664,7 +1664,6 @@ void LLVoiceClient::stateMachine()  						// SLIM SDK: these arguments are no longer necessary.  //						std::string args = " -p tcp -h -c";  						std::string args; -						std::string cmd;  						std::string loglevel = gSavedSettings.getString("VivoxDebugLevel");  						if(loglevel.empty()) @@ -1679,17 +1678,18 @@ void LLVoiceClient::stateMachine()  #if LL_WINDOWS  						PROCESS_INFORMATION pinfo; -						STARTUPINFOA sinfo; +						STARTUPINFOW sinfo;  						memset(&sinfo, 0, sizeof(sinfo)); -						std::string exe_dir = gDirUtilp->getAppRODataDir(); -						cmd = "SLVoice.exe"; -						cmd += args; -						 -						// So retarded.  Windows requires that the second parameter to CreateProcessA be a writable (non-const) string... -						char *args2 = new char[args.size() + 1]; -						strcpy(args2, args.c_str()); -						if(!CreateProcessA(exe_path.c_str(), args2, NULL, NULL, FALSE, 0, NULL, exe_dir.c_str(), &sinfo, &pinfo)) +						std::string exe_dir = gDirUtilp->getExecutableDir(); + +						llutf16string exe_path16 = utf8str_to_utf16str(exe_path); +						llutf16string exe_dir16 = utf8str_to_utf16str(exe_dir); +						llutf16string args16 = utf8str_to_utf16str(args); +						// Create a writeable copy to keep Windows happy. +						U16 *argscpy_16 = new U16[args16.size() + 1]; +						wcscpy_s(argscpy_16,args16.size()+1,args16.c_str()); +						if(!CreateProcessW(exe_path16.c_str(), argscpy_16, NULL, NULL, FALSE, 0, NULL, exe_dir16.c_str(), &sinfo, &pinfo))  						{  //							DWORD dwErr = GetLastError();  						} @@ -1701,7 +1701,7 @@ void LLVoiceClient::stateMachine()  							CloseHandle(pinfo.hThread); // stops leaks - nothing else  						}		 -						delete[] args2; +						delete[] argscpy_16;  #else	// LL_WINDOWS  						// This should be the same for mac and linux  						{ @@ -4972,7 +4972,7 @@ void LLVoiceClient::sessionState::removeAllParticipants()  	if(!mParticipantsByUUID.empty())  	{ -		LL_ERRS("Voice") << "Internal error: empty URI map, non-empty UUID map" << LL_ENDL +		LL_ERRS("Voice") << "Internal error: empty URI map, non-empty UUID map" << LL_ENDL;  	}  } @@ -6488,7 +6488,7 @@ void LLVoiceClient::deleteSession(sessionState *session)  		{  			if(iter->second != session)  			{ -				LL_ERRS("Voice") << "Internal error: session mismatch" << LL_ENDL +				LL_ERRS("Voice") << "Internal error: session mismatch" << LL_ENDL;  			}  			mSessionsByHandle.erase(iter);  		} @@ -6528,7 +6528,7 @@ void LLVoiceClient::deleteAllSessions()  	if(!mSessionsByHandle.empty())  	{ -		LL_ERRS("Voice") << "Internal error: empty session map, non-empty handle map" << LL_ENDL +		LL_ERRS("Voice") << "Internal error: empty session map, non-empty handle map" << LL_ENDL;  	}  } diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 33b86660fa..d44c543266 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -965,7 +965,7 @@ void LLVOSky::calcAtmospherics(void)  		// and vary_sunlight will work properly with moon light  		F32 lighty = unclamped_lightnorm[1]; -		if(lighty < NIGHTTIME_ELEVATION_COS) +		if(lighty < LLSky::NIGHTTIME_ELEVATION_COS)  		{  			lighty = -lighty;  		} diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 466cdfdcd0..62c934fb41 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -147,7 +147,7 @@ protected:  	static S32 getResolution()						{ return sResolution; }  	static S32 getCurrent()						{ return sCurrent; } -	static S32 stepCurrent()					{ return (sCurrent = ++sCurrent % 2); } +	static S32 stepCurrent()					{ return (sCurrent = (sCurrent + 1) % 2); }  	static S32 getNext()						{ return ((sCurrent+1) % 2); }  	static S32 getWhich(const BOOL curr)		{ return curr ? sCurrent : getNext(); } diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 136ffe607d..c8cc6a3d8e 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -304,7 +304,7 @@ void LLWaterParamManager::update(LLViewerCamera * cam)  		mWaterPlane = LLVector4(enorm.v[0], enorm.v[1], enorm.v[2], -ep.dot(enorm));  		LLVector3 sunMoonDir; -		if (gSky.getSunDirection().mV[2] > NIGHTTIME_ELEVATION_COS) 	  +		if (gSky.getSunDirection().mV[2] > LLSky::NIGHTTIME_ELEVATION_COS) 	   		{ 	   			sunMoonDir = gSky.getSunDirection(); 	   		} 	  diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index 4bf64816c7..1581153c19 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -317,7 +317,7 @@ void LLWLParamManager::propagateParameters(void)  	{  		mLightDir = sunDir;  	} -	else if(sunDir.mV[1] < 0 && sunDir.mV[1] > NIGHTTIME_ELEVATION_COS) +	else if(sunDir.mV[1] < 0 && sunDir.mV[1] > LLSky::NIGHTTIME_ELEVATION_COS)  	{  		// clamp v1 to 0 so sun never points up and causes weirdness on some machines  		LLVector3 vec(sunDir.mV[0], sunDir.mV[1], sunDir.mV[2]); diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index a2fd0f0d9c..58ff84a8a6 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -150,11 +150,11 @@ XMLRPC_VALUE LLXMLRPCValue::getValue() const  class LLXMLRPCTransaction::Impl  {  public: -	typedef LLXMLRPCTransaction::Status	Status; +	typedef LLXMLRPCTransaction::EStatus	EStatus;  	LLCurlEasyRequest* mCurlRequest; -	Status		mStatus; +	EStatus		mStatus;  	CURLcode	mCurlCode;  	std::string	mStatusMessage;  	std::string	mStatusURI; @@ -176,7 +176,7 @@ public:  	bool process(); -	void setStatus(Status code, +	void setStatus(EStatus code,  				   const std::string& message = "", const std::string& uri = "");  	void setCurlStatus(CURLcode); @@ -385,7 +385,7 @@ bool LLXMLRPCTransaction::Impl::process()  	return false;  } -void LLXMLRPCTransaction::Impl::setStatus(Status status, +void LLXMLRPCTransaction::Impl::setStatus(EStatus status,  	const std::string& message, const std::string& uri)  {  	mStatus = status; @@ -509,7 +509,7 @@ bool LLXMLRPCTransaction::process()  	return impl.process();  } -LLXMLRPCTransaction::Status LLXMLRPCTransaction::status(int* curlCode) +LLXMLRPCTransaction::EStatus LLXMLRPCTransaction::status(int* curlCode)  {  	if (curlCode)  	{ diff --git a/indra/newview/llxmlrpctransaction.h b/indra/newview/llxmlrpctransaction.h index 528451fcb2..c835423d67 100644 --- a/indra/newview/llxmlrpctransaction.h +++ b/indra/newview/llxmlrpctransaction.h @@ -100,7 +100,7 @@ public:  	~LLXMLRPCTransaction(); -	typedef enum { +	typedef enum e_status {  		StatusNotStarted,  		StatusStarted,  		StatusDownloading, @@ -108,12 +108,12 @@ public:  		StatusCURLError,  		StatusXMLRPCError,  		StatusOtherError -	} Status; +	} EStatus;  	bool process();  		// run the request a little, returns true when done -	Status status(int* curlCode); +	EStatus status(int* curlCode);  		// return status, and extended CURL code, if code isn't null  	std::string statusMessage();  		// return a message string, suitable for showing the user diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c736d0ccc8..3800b9223d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -35,7 +35,7 @@  #include "pipeline.h"  // library includes -#include "llaudioengine.h" // For MAX_BUFFERS for debugging. +#include "llaudioengine.h" // For debugging.  #include "imageids.h"  #include "llerror.h"  #include "llviewercontrol.h" @@ -4289,7 +4289,7 @@ void LLPipeline::setupAvatarLights(BOOL for_edit)  			}  		}  		F32 backlight_mag; -		if (gSky.getSunDirection().mV[2] >= NIGHTTIME_ELEVATION_COS) +		if (gSky.getSunDirection().mV[2] >= LLSky::NIGHTTIME_ELEVATION_COS)  		{  			backlight_mag = BACKLIGHT_DAY_MAGNITUDE_OBJECT;  		} @@ -4475,7 +4475,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)  	// Light 0 = Sun or Moon (All objects)  	{ -		if (gSky.getSunDirection().mV[2] >= NIGHTTIME_ELEVATION_COS) +		if (gSky.getSunDirection().mV[2] >= LLSky::NIGHTTIME_ELEVATION_COS)  		{  			mSunDir.setVec(gSky.getSunDirection());  			mSunDiffuse.setVec(gSky.getSunDiffuseColor()); diff --git a/indra/newview/res-sdl/arrow.BMP b/indra/newview/res-sdl/arrow.BMPBinary files differ new file mode 100644 index 0000000000..a8f6da64b5 --- /dev/null +++ b/indra/newview/res-sdl/arrow.BMP diff --git a/indra/newview/res-sdl/arrowcop.BMP b/indra/newview/res-sdl/arrowcop.BMPBinary files differ new file mode 100644 index 0000000000..1a26a0df34 --- /dev/null +++ b/indra/newview/res-sdl/arrowcop.BMP diff --git a/indra/newview/res-sdl/arrowcopmulti.BMP b/indra/newview/res-sdl/arrowcopmulti.BMPBinary files differ new file mode 100644 index 0000000000..48f153cef6 --- /dev/null +++ b/indra/newview/res-sdl/arrowcopmulti.BMP diff --git a/indra/newview/res-sdl/arrowdrag.BMP b/indra/newview/res-sdl/arrowdrag.BMPBinary files differ new file mode 100644 index 0000000000..cd868eec20 --- /dev/null +++ b/indra/newview/res-sdl/arrowdrag.BMP diff --git a/indra/newview/res-sdl/circleandline.BMP b/indra/newview/res-sdl/circleandline.BMPBinary files differ new file mode 100644 index 0000000000..284ae8b7d5 --- /dev/null +++ b/indra/newview/res-sdl/circleandline.BMP diff --git a/indra/newview/res-sdl/cross.BMP b/indra/newview/res-sdl/cross.BMPBinary files differ new file mode 100644 index 0000000000..0b4672d4d6 --- /dev/null +++ b/indra/newview/res-sdl/cross.BMP diff --git a/indra/newview/res-sdl/hand.BMP b/indra/newview/res-sdl/hand.BMPBinary files differ new file mode 100644 index 0000000000..2a092fbb7f --- /dev/null +++ b/indra/newview/res-sdl/hand.BMP diff --git a/indra/newview/res-sdl/ibeam.BMP b/indra/newview/res-sdl/ibeam.BMPBinary files differ new file mode 100644 index 0000000000..820904a228 --- /dev/null +++ b/indra/newview/res-sdl/ibeam.BMP diff --git a/indra/newview/res-sdl/ll_icon.BMP b/indra/newview/res-sdl/ll_icon.BMPBinary files differ new file mode 100644 index 0000000000..4a44aafbfa --- /dev/null +++ b/indra/newview/res-sdl/ll_icon.BMP diff --git a/indra/newview/res-sdl/llarrow.BMP b/indra/newview/res-sdl/llarrow.BMPBinary files differ new file mode 100644 index 0000000000..a8f6da64b5 --- /dev/null +++ b/indra/newview/res-sdl/llarrow.BMP diff --git a/indra/newview/res-sdl/llarrowdrag.BMP b/indra/newview/res-sdl/llarrowdrag.BMPBinary files differ new file mode 100644 index 0000000000..cd868eec20 --- /dev/null +++ b/indra/newview/res-sdl/llarrowdrag.BMP diff --git a/indra/newview/res-sdl/llarrowdragmulti.BMP b/indra/newview/res-sdl/llarrowdragmulti.BMPBinary files differ new file mode 100644 index 0000000000..fb528bc92d --- /dev/null +++ b/indra/newview/res-sdl/llarrowdragmulti.BMP diff --git a/indra/newview/res-sdl/llarrowlocked.BMP b/indra/newview/res-sdl/llarrowlocked.BMPBinary files differ new file mode 100644 index 0000000000..0aaa441ab1 --- /dev/null +++ b/indra/newview/res-sdl/llarrowlocked.BMP diff --git a/indra/newview/res-sdl/llgrablocked.BMP b/indra/newview/res-sdl/llgrablocked.BMPBinary files differ new file mode 100644 index 0000000000..847439670f --- /dev/null +++ b/indra/newview/res-sdl/llgrablocked.BMP diff --git a/indra/newview/res-sdl/llno.BMP b/indra/newview/res-sdl/llno.BMPBinary files differ new file mode 100644 index 0000000000..284ae8b7d5 --- /dev/null +++ b/indra/newview/res-sdl/llno.BMP diff --git a/indra/newview/res-sdl/llnolocked.BMP b/indra/newview/res-sdl/llnolocked.BMPBinary files differ new file mode 100644 index 0000000000..61f0170cb3 --- /dev/null +++ b/indra/newview/res-sdl/llnolocked.BMP diff --git a/indra/newview/res-sdl/lltoolcamera.BMP b/indra/newview/res-sdl/lltoolcamera.BMPBinary files differ new file mode 100644 index 0000000000..c961d7a49c --- /dev/null +++ b/indra/newview/res-sdl/lltoolcamera.BMP diff --git a/indra/newview/res-sdl/lltoolcreate.BMP b/indra/newview/res-sdl/lltoolcreate.BMPBinary files differ new file mode 100644 index 0000000000..08a4a9322d --- /dev/null +++ b/indra/newview/res-sdl/lltoolcreate.BMP diff --git a/indra/newview/res-sdl/lltoolfocus.BMP b/indra/newview/res-sdl/lltoolfocus.BMPBinary files differ new file mode 100644 index 0000000000..afb90a95e3 --- /dev/null +++ b/indra/newview/res-sdl/lltoolfocus.BMP diff --git a/indra/newview/res-sdl/lltoolgrab.BMP b/indra/newview/res-sdl/lltoolgrab.BMPBinary files differ new file mode 100644 index 0000000000..f2ac68bf3c --- /dev/null +++ b/indra/newview/res-sdl/lltoolgrab.BMP diff --git a/indra/newview/res-sdl/lltoolland.BMP b/indra/newview/res-sdl/lltoolland.BMPBinary files differ new file mode 100644 index 0000000000..64e6365625 --- /dev/null +++ b/indra/newview/res-sdl/lltoolland.BMP diff --git a/indra/newview/res-sdl/lltoolpan.BMP b/indra/newview/res-sdl/lltoolpan.BMPBinary files differ new file mode 100644 index 0000000000..ffbef21ec7 --- /dev/null +++ b/indra/newview/res-sdl/lltoolpan.BMP diff --git a/indra/newview/res-sdl/lltoolpipette.BMP b/indra/newview/res-sdl/lltoolpipette.BMPBinary files differ new file mode 100644 index 0000000000..2d27118289 --- /dev/null +++ b/indra/newview/res-sdl/lltoolpipette.BMP diff --git a/indra/newview/res-sdl/lltoolrotate.BMP b/indra/newview/res-sdl/lltoolrotate.BMPBinary files differ new file mode 100644 index 0000000000..dd84673018 --- /dev/null +++ b/indra/newview/res-sdl/lltoolrotate.BMP diff --git a/indra/newview/res-sdl/lltoolscale.BMP b/indra/newview/res-sdl/lltoolscale.BMPBinary files differ new file mode 100644 index 0000000000..882515e5e3 --- /dev/null +++ b/indra/newview/res-sdl/lltoolscale.BMP diff --git a/indra/newview/res-sdl/lltooltranslate.BMP b/indra/newview/res-sdl/lltooltranslate.BMPBinary files differ new file mode 100644 index 0000000000..d084f6a026 --- /dev/null +++ b/indra/newview/res-sdl/lltooltranslate.BMP diff --git a/indra/newview/res-sdl/lltoolzoomin.BMP b/indra/newview/res-sdl/lltoolzoomin.BMPBinary files differ new file mode 100644 index 0000000000..e4e46cc702 --- /dev/null +++ b/indra/newview/res-sdl/lltoolzoomin.BMP diff --git a/indra/newview/res-sdl/lltoolzoomout.BMP b/indra/newview/res-sdl/lltoolzoomout.BMPBinary files differ new file mode 100644 index 0000000000..7f958383ab --- /dev/null +++ b/indra/newview/res-sdl/lltoolzoomout.BMP diff --git a/indra/newview/res-sdl/sizenesw.BMP b/indra/newview/res-sdl/sizenesw.BMPBinary files differ new file mode 100644 index 0000000000..559579f40e --- /dev/null +++ b/indra/newview/res-sdl/sizenesw.BMP diff --git a/indra/newview/res-sdl/sizens.BMP b/indra/newview/res-sdl/sizens.BMPBinary files differ new file mode 100644 index 0000000000..8373077dff --- /dev/null +++ b/indra/newview/res-sdl/sizens.BMP diff --git a/indra/newview/res-sdl/sizenwse.BMP b/indra/newview/res-sdl/sizenwse.BMPBinary files differ new file mode 100644 index 0000000000..6d069fa765 --- /dev/null +++ b/indra/newview/res-sdl/sizenwse.BMP diff --git a/indra/newview/res-sdl/sizewe.BMP b/indra/newview/res-sdl/sizewe.BMPBinary files differ new file mode 100644 index 0000000000..878df453a4 --- /dev/null +++ b/indra/newview/res-sdl/sizewe.BMP diff --git a/indra/newview/res-sdl/toolmediaopen.BMP b/indra/newview/res-sdl/toolmediaopen.BMPBinary files differ new file mode 100644 index 0000000000..ac4b231994 --- /dev/null +++ b/indra/newview/res-sdl/toolmediaopen.BMP diff --git a/indra/newview/res-sdl/toolpause.BMP b/indra/newview/res-sdl/toolpause.BMPBinary files differ new file mode 100644 index 0000000000..dd2c6857d2 --- /dev/null +++ b/indra/newview/res-sdl/toolpause.BMP diff --git a/indra/newview/res-sdl/toolpickobject.BMP b/indra/newview/res-sdl/toolpickobject.BMPBinary files differ new file mode 100644 index 0000000000..25469fc3a8 --- /dev/null +++ b/indra/newview/res-sdl/toolpickobject.BMP diff --git a/indra/newview/res-sdl/toolpickobject2.BMP b/indra/newview/res-sdl/toolpickobject2.BMPBinary files differ new file mode 100644 index 0000000000..09df69e675 --- /dev/null +++ b/indra/newview/res-sdl/toolpickobject2.BMP diff --git a/indra/newview/res-sdl/toolpickobject3.BMP b/indra/newview/res-sdl/toolpickobject3.BMPBinary files differ new file mode 100644 index 0000000000..fc28698050 --- /dev/null +++ b/indra/newview/res-sdl/toolpickobject3.BMP diff --git a/indra/newview/res-sdl/toolplay.BMP b/indra/newview/res-sdl/toolplay.BMPBinary files differ new file mode 100644 index 0000000000..9c40d7dbec --- /dev/null +++ b/indra/newview/res-sdl/toolplay.BMP diff --git a/indra/newview/res-sdl/wait.BMP b/indra/newview/res-sdl/wait.BMPBinary files differ new file mode 100644 index 0000000000..26dec59afe --- /dev/null +++ b/indra/newview/res-sdl/wait.BMP diff --git a/indra/newview/res-sdl/working.BMP b/indra/newview/res-sdl/working.BMPBinary files differ new file mode 100644 index 0000000000..26dec59afe --- /dev/null +++ b/indra/newview/res-sdl/working.BMP diff --git a/indra/newview/skins/default/xui/en/floater_auction.xml b/indra/newview/skins/default/xui/en/floater_auction.xml index 29f8b49794..fb0994b4cd 100644 --- a/indra/newview/skins/default/xui/en/floater_auction.xml +++ b/indra/newview/skins/default/xui/en/floater_auction.xml @@ -1,9 +1,9 @@  <?xml version="1.0" encoding="utf-8" standalone="yes" ?>  <floater   can_resize="true" - height="368" + height="412"   layout="topleft" - min_height="368" + min_height="412"   min_width="420"   name="floater_auction"   help_topic="floater_auction" @@ -49,21 +49,47 @@       left_delta="0"       name="snapshot_btn"       top_pad="4" -     width="96"> +     width="150">        <button.commit_callback           function="ClickSnapshot" />      </button>      <button       follows="left|bottom"       height="20" -     label="OK" -     label_selected="OK" +     label="Sell to Anyone" +     label_selected="Sell to Anyone" +     layout="topleft" +     left_delta="0" +     name="sell_to_anyone_btn" +     top_pad="4" +     width="150"> +      <button.commit_callback +         function="ClickSellToAnyone" /> +    </button> +    <button +     follows="left|bottom" +     height="20" +     label="Clear Settings" +     label_selected="Clear Settings" +     layout="topleft" +     left_delta="0" +     name="reset_parcel_btn" +     top_pad="4" +     width="150"> +      <button.commit_callback +         function="ClickResetParcel" /> +    </button> +    <button +     follows="left|bottom" +     height="20" +     label="Start Auction" +     label_selected="Start Auction"       layout="topleft"       left_pad="4" -     name="ok_btn" +     name="start_auction_btn"       top_delta="0" -     width="48"> +     width="150">        <button.commit_callback -          function="ClickOK" /> +          function="ClickStartAuction" />      </button>  </floater> diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml index a243cb399e..5ee136c422 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml @@ -49,7 +49,7 @@       layout="topleft"       left="80"       name="Discard" -     top="302" +     top="283"       width="100" />      <button       follows="left|bottom" @@ -68,8 +68,66 @@       layout="topleft"       left="13"       name="dimensions" -     top="287" +     top="309"       width="303">          [WIDTH]px x [HEIGHT]px      </text> +	<text +	 type="string" +	 length="1" +	 bg_visible="false" +	 border_drop_shadow_visible="false" +	 border_visible="false" +	 top="309" +	 drop_shadow_visible="true" +	 enabled="true" +	 follows="right|bottom" +	 font="SansSerifSmall" +	 h_pad="0" +	 halign="right" +	 height="14" +	 left="54" +	 mouse_opaque="true" +	 name="aspect_ratio" +	 v_pad="0" +	 width="110"> +		Preview Aspect Ratio +	</text> +	<combo_box +	 allow_text_entry="true"  +	 top="306"  +	 follows="right|bottom"  +	 height="20" +	 left="176" +	 max_chars="20" +	 mouse_opaque="true" +	 enabled="true" +	 width="108" +	 name="combo_aspect_ratio" +	 tool_tip="Preview at a fixed aspect ratio"> +		<combo_item name="Unconstrained" value="Unconstrained"> +			Unconstrained +		</combo_item> +		<combo_item name="1:1" value="1:1" tool_tip="Group Insignia or 1st Life Profile"> +			1:1 +		</combo_item> +		<combo_item name="4:3" value="4:3" tool_tip="2nd Life Profile"> +			4:3 +		</combo_item> +		<combo_item name="10:7" value="10:7" tool_tip="Classifieds and search listings, landmarks"> +			10:7 +		</combo_item> +		<combo_item name="3:2" value="3:2" tool_tip="About land"> +			3:2 +		</combo_item> +		<combo_item name="16:10" value="16:10"> +			16:10 +		</combo_item> +		<combo_item name="16:9" value="16:9" tool_tip="Profile Picks"> +			16:9 +		</combo_item> +		<combo_item name="2:1" value="2:1"> +			2:1 +		</combo_item> +	</combo_box>  </floater> diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 32456c00ee..80750b140a 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -722,7 +722,6 @@      </button>      <text       type="string" -     text_color="LabelSelectedDisabledColor"       length="1"       height="12"       follows="left|top" @@ -736,7 +735,6 @@      </text>      <text       type="string" -     text_color="LabelSelectedDisabledColor"       length="1"       follows="left|top"       halign="right" diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index bd76b10312..4386c0c5ee 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -417,7 +417,8 @@       left_delta="0"       name="search_results"       top_pad="10" -     width="222"> +     width="222" +     sort_column="1">          <scroll_list.columns           label=""           name="icon" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 57ea24ac0e..b30597bcb6 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -355,7 +355,8 @@           label="World Map"           layout="topleft"           name="World Map" -         shortcut="control|M"> +         shortcut="control|M" +         use_mac_ctrl="true">              <menu_item_check.on_check               function="Floater.Visible"               parameter="world_map" /> @@ -981,6 +982,57 @@                  </menu_item_check>              </menu>          </menu> +        <menu +         create_jump_keys="true" +         label="Select Linked Parts" +         layout="topleft" +         name="Select Linked Parts" +         tear_off="true"> +            <menu_item_call +             label="Select Next Part" +             layout="topleft" +             name="Select Next Part" +	     shortcut="control|."> +                <menu_item_call.on_click +                 function="Tools.SelectNextPart" +                 parameter="next" /> +                <menu_item_call.on_enable +                 function="Tools.EnableSelectNextPart" /> +            </menu_item_call> +            <menu_item_call +             label="Select Previous Part" +             layout="topleft" +             name="Select Previous Part" +	     shortcut="control|,"> +                <menu_item_call.on_click +                 function="Tools.SelectNextPart" +                 parameter="previous" /> +                <menu_item_call.on_enable +                 function="Tools.EnableSelectNextPart" /> +            </menu_item_call> +            <menu_item_call +             label="Include Next Part" +             layout="topleft" +             name="Include Next Part" +	     shortcut="control|shift|."> +                <menu_item_call.on_click +                 function="Tools.SelectNextPart" +                 parameter="includenext" /> +                <menu_item_call.on_enable +                 function="Tools.EnableSelectNextPart" /> +            </menu_item_call> +            <menu_item_call +             label="Include Previous Part" +             layout="topleft" +             name="Include Previous Part" +	     shortcut="control|shift|,"> +                <menu_item_call.on_click +                 function="Tools.SelectNextPart" +                 parameter="includeprevious" /> +                <menu_item_call.on_enable +                 function="Tools.EnableSelectNextPart" /> +            </menu_item_call> +        </menu>      </menu>      <menu       label="Help" @@ -1603,7 +1655,8 @@               label="Texture Console"               layout="topleft"               name="Texture Console" -             shortcut="control|shift|3"> +             shortcut="control|shift|3" +             use_mac_ctrl="true">                  <menu_item_check.on_check                   function="Advanced.CheckConsole"                   parameter="texture" /> @@ -1615,7 +1668,8 @@               label="Debug Console"               layout="topleft"               name="Debug Console" -             shortcut="control|shift|4"> +             shortcut="control|shift|4" +             use_mac_ctrl="true">                  <menu_item_check.on_check                   function="Advanced.CheckConsole"                   parameter="debug" /> @@ -1627,7 +1681,8 @@               label="Fast Timers"               layout="topleft"               name="Fast Timers" -             shortcut="control|shift|9"> +             shortcut="control|shift|9" +             use_mac_ctrl="true">                  <menu_item_check.on_check                   function="Advanced.CheckConsole"                   parameter="fast timers" /> @@ -1639,7 +1694,8 @@               label="Memory"               layout="topleft"               name="Memory" -             shortcut="control|shift|0"> +             shortcut="control|shift|0" +             use_mac_ctrl="true">                  <menu_item_check.on_check                   function="Advanced.CheckConsole"                   parameter="memory view" /> @@ -1651,7 +1707,8 @@               label="Notifications Console"               layout="topleft"               name="Notifications" -             shortcut="control|shift|5"> +             shortcut="control|shift|5" +             use_mac_ctrl="true">                  <menu_item_check.on_check                   function="Advanced.CheckConsole"                   parameter="notifications" /> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 91c19badfa..217178a5ef 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -485,6 +485,20 @@ You do not have enough L$ to join this group.    <notification     icon="alertmodal.tga" +   name="CreateGroupCost" +   type="alertmodal"> +Creating this group will cost L$100. +Groups need more than one member, or they are deleted forever. +Please invite members within 48 hours. +    <usetemplate +     canceltext="Cancel" +     name="okcancelbuttons" +     notext="Cancel" +     yestext="Create group for L$100"/> +  </notification> + +  <notification +   icon="alertmodal.tga"     name="LandBuyPass"     type="alertmodal">  For L$[COST] you can enter this land ('[PARCEL_NAME]') for [TIME] hours.  Buy a pass? @@ -493,7 +507,7 @@ For L$[COST] you can enter this land ('[PARCEL_NAME]') for [TIME] hour       notext="Cancel"       yestext="OK"/>    </notification> - +      <notification     icon="alertmodal.tga"     name="SalePriceRestriction" @@ -6487,20 +6501,6 @@ The SLurl you clicked on is not supported.        <button index="0" name="respondbutton" text="Respond"/>      </form>    </notification> -   -  <notification -   icon="alertmodal.tga" -   name="CreateGroupCost" -   type="alertmodal"> -Creating this group will cost L$100. -Groups need more than one member, or they are deleted forever. -Please invite members within 48 hours. -    <usetemplate -     canceltext="Cancel" -     name="okcancelbuttons" -     notext="Cancel" -     yestext="Create group for L$100"/> -  </notification>    <notification icon="notifytip.tga"  		name="AttachmentSaved" type="notifytip"> diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml index 9a4480127d..6f01202680 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -212,4 +212,4 @@ Hover your mouse over the options for more help.               value="Not Mature" />          </combo_box>        </panel> -</panel> 
\ No newline at end of file +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 06ecfdc995..f7d7d52b68 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -217,7 +217,7 @@ My Avatar:       width="237"       top_pad="0"/>      <check_box -     control_name="TapTapHoldtoRun" +     control_name="AllowTapTapHoldRun"       height="20"       label="Tap-tap-hold to run"       layout="topleft" @@ -225,36 +225,15 @@ My Avatar:       name="tap_tap_hold_to_run"       width="237"       top_pad="0"/> -    <!--menu_item_check -         label="Tap-Tap-Hold to Run" -         layout="topleft" -         name="Tap-Tap-Hold to Run"> -            <menu_item_check.on_check -             function="Advanced.CheckAllowTapTapHoldRun" -             parameter="TapTapHoldRun" /> -            <menu_item_check.on_click -             function="Advanced.ToggleAllowTapTapHoldRun" /> -        </menu_item_check-->        <check_box -     control_name="EnableLipSync" +     control_name="LipSyncEnabled"       height="20" -     label="Move my avatar's lips when speaking" +     label="Move avatar lips when speaking"       layout="topleft"       left_delta="0"       name="enable_lip_sync"       width="237"       top_pad="0" /> -            <!--menu_item_check -         label="Enable Lip Sync(Beta)" -         layout="topleft" -         name="Enable Lip Sync(Beta)"> -            <menu_item_check.on_check -             function="CheckControl" -             parameter="LipSyncEnabled" /> -            <menu_item_check.on_click -             function="ToggleControl" -             parameter="LipSyncEnabled" /> -        </menu_item_check-->      <check_box       control_name="test"       height="20" @@ -293,4 +272,4 @@ My Avatar:      </radio_group> -</panel>
\ No newline at end of file +</panel> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index f620e8f2d7..360fd3c2db 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -230,8 +230,10 @@  	<string name="anim_yes_happy">Yes (Happy)</string>  	<string name="anim_yes_head">Yes</string> +	<!-- world map -->  	<string name="texture_loading">Loading...</string>  	<string name="worldmap_offline">Offline</string> +	<string name="worldmap_results_none_found">None found.</string>  	<!-- animations uploading status codes -->  	<string name="Ok">OK</string> @@ -2110,6 +2112,15 @@ Expected .wav, .tga, .bmp, .jpg, .jpeg, or .bvh  	<string name="AddLandmarkNavBarMenu">Add Landmark...</string>	   	<string name="EditLandmarkNavBarMenu">Edit Landmark...</string> +	<!-- menu accelerators --> +	<string name="accel-mac-control">Ctrl-</string> +	<string name="accel-mac-command">Cmd-</string> +	<string name="accel-mac-option">Opt-</string> +	<string name="accel-mac-shift">Shift-</string> +	<string name="accel-win-control">Ctrl+</string> +	<string name="accel-win-alt">Alt+</string> +	<string name="accel-win-shift">Shift+</string> +  	<!-- Previews -->  	<string name="FileSaved">File Saved</string>	  	<string name="Receiving">Receiving</string>	 @@ -2225,9 +2236,8 @@ Running in window.  	<string name="MBPixelFmtErr">Can't find suitable pixel format</string>  	<string name="MBPixelFmtDescErr">Can't get pixel format description</string>  	<string name="MBTrueColorWindow"> -		[APP_NAME] requires True Color (32-bit) to run in a window. -Please go to Control Panels > Display > Settings and set the screen to 32-bit color. -Alternately, if you choose to run fullscreen, [APP_NAME] will automatically adjust the screen each time it runs. +		[APP_NAME] requires True Color (32-bit) to run. +Please go to your computer's display settings and set the color mode to 32-bit.  	</string>  	<string name="MBAlpha">  		[APP_NAME] is unable to run because it can't get an 8 bit alpha channel.  Usually this is due to video card driver issues. diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 545fa29675..89f916937b 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -696,20 +696,30 @@ class Linux_i686Manifest(LinuxManifest):          #self.path("secondlife-i686.supp")          if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"): -            #self.path("libkdu_v42R.so", "libkdu.so") -            self.path("libfmod-3.75.so")              self.path("libapr-1.so.0")              self.path("libaprutil-1.so.0")              self.path("libdb-4.2.so")              self.path("libcrypto.so.0.9.7")              self.path("libexpat.so.1")              self.path("libssl.so.0.9.7") -            self.path("libuuid.so", "libuuid.so.1") +            self.path("libuuid.so.1")              self.path("libSDL-1.2.so.0")              self.path("libELFIO.so")              self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3")              self.path("libalut.so")              self.path("libopenal.so", "libopenal.so.1") +            try: +                    self.path("libkdu_v42R.so", "libkdu.so") +                    pass +            except: +                    print "Skipping libkdu_v42R.so - not found" +                    pass +            try: +                    self.path("libfmod-3.75.so") +                    pass +            except: +                    print "Skipping libkdu_v42R.so - not found" +                    pass              self.end_prefix("lib")              # Vivox runtimes diff --git a/indra/test/lltut.h b/indra/test/lltut.h index 47ea9d3f9e..bbb437c3f9 100644 --- a/indra/test/lltut.h +++ b/indra/test/lltut.h @@ -74,7 +74,7 @@ namespace tut  	inline void ensure_memory_matches(const char* msg,const void* actual, U32 actual_len, const void* expected,U32 expected_len)  	{  		if((expected_len != actual_len) ||  -			(memcmp(actual, expected, actual_len) != 0)) +			(std::memcmp(actual, expected, actual_len) != 0))  		{  			std::stringstream ss;  			ss << (msg?msg:"") << (msg?": ":"") << "not equal"; diff --git a/install.xml b/install.xml index e7a7648345..44224664ca 100644 --- a/install.xml +++ b/install.xml @@ -53,26 +53,12 @@          <string>lgpl</string>          <key>packages</key>          <map> -          <key>darwin</key> -          <map> -            <key>md5sum</key> -            <string>40b8a63b553d91304588fba6796d7cc1</string> -            <key>url</key> -            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/SDL-1.2.5-darwin-20091006.tar.bz2</uri> -          </map>            <key>linux</key>            <map>              <key>md5sum</key> -            <string>298fd8a3351f6a8d757d205a1e9ad82f</string> -            <key>url</key> -            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/SDL-1.2.12-linux-20091006.tar.bz2</uri> -          </map> -          <key>windows</key> -          <map> -            <key>md5sum</key> -            <string>33bb17ecbef6cdadff533d97135f3a56</string> +            <string>fce0ff7d2cdf0f36c1647e6a3916e29e</string>              <key>url</key> -            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/SDL-1.2.5-windows-20091006.tar.bz2</uri> +            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/SDL-1.2.12-linux-20090218.tar.bz2</uri>            </map>          </map>        </map> | 
