diff options
Diffstat (limited to 'indra/newview')
29 files changed, 443 insertions, 85 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 8918fc3018..62cb8380c0 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -63,8 +63,6 @@ include_directories(      )  set(viewer_SOURCE_FILES -    llaccordionctrl.cpp -    llaccordionctrltab.cpp      llagent.cpp      llagentaccess.cpp      llagentdata.cpp @@ -569,8 +567,6 @@ endif (LINUX)  set(viewer_HEADER_FILES      CMakeLists.txt      ViewerInstall.cmake -    llaccordionctrl.h -    llaccordionctrltab.h      llagent.h      llagentaccess.h      llagentdata.h diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index f49f862045..10a2dd132a 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -95,19 +95,38 @@ public:  	enum ELibraryOutfitFetchStep {  		LOFS_FOLDER = 0,  		LOFS_OUTFITS, +		LOFS_LIBRARY, +		LOFS_IMPORTED,  		LOFS_CONTENTS  	}; -	LLLibraryOutfitsFetch() : mCurrFetchStep(LOFS_FOLDER), mOutfitsPopulated(false) {} +	LLLibraryOutfitsFetch() : mCurrFetchStep(LOFS_FOLDER), mOutfitsPopulated(false)  +	{ +		mMyOutfitsID = LLUUID::null; +		mClothingID = LLUUID::null; +		mLibraryClothingID = LLUUID::null; +		mImportedClothingID = LLUUID::null; +		mImportedClothingName = "Imported Library Clothing"; +	}  	~LLLibraryOutfitsFetch() {} -	virtual void done();	 +	virtual void done();  	void doneIdle(); +	LLUUID mMyOutfitsID; +	void importedFolderFetch();  protected:  	void folderDone(void);  	void outfitsDone(void); +	void libraryDone(void); +	void importedFolderDone(void);  	void contentsDone(void);  	enum ELibraryOutfitFetchStep mCurrFetchStep; -	std::vector< std::pair< LLUUID, std::string > > mOutfits; +	typedef std::vector< std::pair< LLUUID, std::string > > cloth_folder_vec_t; +	cloth_folder_vec_t mLibraryClothingFolders; +	cloth_folder_vec_t mImportedClothingFolders;  	bool mOutfitsPopulated; +	LLUUID mClothingID; +	LLUUID mLibraryClothingID; +	LLUUID mImportedClothingID; +	std::string mImportedClothingName;  };  LLAgentWearables gAgentWearables; @@ -2126,11 +2145,15 @@ void LLAgentWearables::populateMyOutfitsFolder(void)  	// Get the complete information on the items in the inventory and   	// setup an observer that will wait for that to happen.  	LLInventoryFetchDescendentsObserver::folder_ref_t folders; -	const LLUUID my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); +	outfits->mMyOutfitsID = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); -	folders.push_back(my_outfits_id); +	folders.push_back(outfits->mMyOutfitsID);  	gInventory.addObserver(outfits);  	outfits->fetchDescendents(folders); +	if (outfits->isEverythingComplete()) +	{ +		outfits->done(); +	}  }  void LLLibraryOutfitsFetch::done() @@ -2144,13 +2167,24 @@ void LLLibraryOutfitsFetch::done()  void LLLibraryOutfitsFetch::doneIdle()  {  	gInventory.addObserver(this); // Add this back in since it was taken out during ::done() +	  	switch (mCurrFetchStep)  	{  		case LOFS_FOLDER:  			folderDone(); +			mCurrFetchStep = LOFS_OUTFITS;  			break;  		case LOFS_OUTFITS:  			outfitsDone(); +			mCurrFetchStep = LOFS_LIBRARY; +			break; +		case LOFS_LIBRARY: +			libraryDone(); +			mCurrFetchStep = LOFS_IMPORTED; +			break; +		case LOFS_IMPORTED: +			importedFolderDone(); +			mCurrFetchStep = LOFS_CONTENTS;  			break;  		case LOFS_CONTENTS:  			contentsDone(); @@ -2172,67 +2206,217 @@ void LLLibraryOutfitsFetch::doneIdle()  void LLLibraryOutfitsFetch::folderDone(void)  { -	// Early out if we already have items in My Outfits.  	LLInventoryModel::cat_array_t cat_array;  	LLInventoryModel::item_array_t wearable_array; -	gInventory.collectDescendents(mCompleteFolders.front(), cat_array, wearable_array,  +	gInventory.collectDescendents(mMyOutfitsID, cat_array, wearable_array,   								  LLInventoryModel::EXCLUDE_TRASH); +	 +	// Early out if we already have items in My Outfits.  	if (cat_array.count() > 0 || wearable_array.count() > 0)  	{  		mOutfitsPopulated = true;  		return;  	} -	// Get the UUID of the library's clothing folder -	const LLUUID library_clothing_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING, false, true); +	mClothingID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); +	mLibraryClothingID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING, false, true);  	mCompleteFolders.clear();  	// Get the complete information on the items in the inventory.  	LLInventoryFetchDescendentsObserver::folder_ref_t folders; -	folders.push_back(library_clothing_id); -	mCurrFetchStep = LOFS_OUTFITS; +	folders.push_back(mClothingID); +	folders.push_back(mLibraryClothingID);  	fetchDescendents(folders); +	if (isEverythingComplete()) +	{ +		done(); +	}  }  void LLLibraryOutfitsFetch::outfitsDone(void)  {  	LLInventoryModel::cat_array_t cat_array;  	LLInventoryModel::item_array_t wearable_array; -	gInventory.collectDescendents(mCompleteFolders.front(), cat_array, wearable_array,  -								  LLInventoryModel::EXCLUDE_TRASH); -	  	LLInventoryFetchDescendentsObserver::folder_ref_t folders; +	// Collect the contents of the Library's Clothing folder +	gInventory.collectDescendents(mLibraryClothingID, cat_array, wearable_array,  +								  LLInventoryModel::EXCLUDE_TRASH); +	  	llassert(cat_array.count() > 0);  	for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin();  		 iter != cat_array.end();  		 ++iter)  	{  		const LLViewerInventoryCategory *cat = iter->get(); +		 +		// Get the names and id's of every outfit in the library, except for ruth and other "misc" outfits.  		if (cat->getName() != "More Outfits" && cat->getName() != "Ruth")  		{ +			// Get the name of every outfit in the library   			folders.push_back(cat->getUUID()); -			mOutfits.push_back(std::make_pair(cat->getUUID(), cat->getName())); +			mLibraryClothingFolders.push_back(std::make_pair(cat->getUUID(), cat->getName())); +		} +	} +	 +	// Collect the contents of your Inventory Clothing folder +	cat_array.clear(); +	wearable_array.clear(); +	gInventory.collectDescendents(mClothingID, cat_array, wearable_array,  +								  LLInventoryModel::EXCLUDE_TRASH); + +	// Check if you already have an "Imported Library Clothing" folder +	for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin(); +		 iter != cat_array.end(); +		 ++iter) +	{ +		const LLViewerInventoryCategory *cat = iter->get(); +		if (cat->getName() == mImportedClothingName) +		{ +			mImportedClothingID = cat->getUUID();  		}  	} +	  	mCompleteFolders.clear(); +	 +	fetchDescendents(folders); +	if (isEverythingComplete()) +	{ +		done(); +	} +} + +class LLLibraryOutfitsCopyDone: public LLInventoryCallback +{ +public: +	LLLibraryOutfitsCopyDone(LLLibraryOutfitsFetch * fetcher): +	mFireCount(0), mLibraryOutfitsFetcher(fetcher) +	{ +	} +	 +	virtual ~LLLibraryOutfitsCopyDone() +	{ +		if (mLibraryOutfitsFetcher) +		{ +			gInventory.addObserver(mLibraryOutfitsFetcher); +			mLibraryOutfitsFetcher->done(); +		} +	} +	 +	/* virtual */ void fire(const LLUUID& inv_item) +	{ +		mFireCount++; +	} +private: +	U32 mFireCount; +	LLLibraryOutfitsFetch * mLibraryOutfitsFetcher; +}; -	mCurrFetchStep = LOFS_CONTENTS; +void LLLibraryOutfitsFetch::libraryDone(void) +{ +	// Copy the clothing folders from the library into the imported clothing folder if necessary. +	if (mImportedClothingID == LLUUID::null) +	{ +		gInventory.removeObserver(this); +		LLPointer<LLInventoryCallback> copy_waiter = new LLLibraryOutfitsCopyDone(this); +		mImportedClothingID = gInventory.createNewCategory(mClothingID, +														   LLFolderType::FT_NONE, +														   mImportedClothingName); +		 +		for (cloth_folder_vec_t::const_iterator iter = mLibraryClothingFolders.begin(); +			 iter != mLibraryClothingFolders.end(); +			 ++iter) +		{ +			LLUUID folder_id = gInventory.createNewCategory(mImportedClothingID, +															LLFolderType::FT_NONE, +															iter->second); +			LLAppearanceManager::getInstance()->shallowCopyCategory(iter->first, folder_id, copy_waiter); +		} +	} +	else +	{ +		// Skip straight to fetching the contents of the imported folder +		importedFolderFetch(); +	} +} + +void LLLibraryOutfitsFetch::importedFolderFetch(void) +{ +	// Fetch the contents of the Imported Clothing Folder +	LLInventoryFetchDescendentsObserver::folder_ref_t folders; +	folders.push_back(mImportedClothingID); +	 +	mCompleteFolders.clear(); +	  	fetchDescendents(folders); +	if (isEverythingComplete()) +	{ +		done(); +	}  } -void LLLibraryOutfitsFetch::contentsDone(void) +void LLLibraryOutfitsFetch::importedFolderDone(void)  { -	for(S32 i = 0; i < (S32)mOutfits.size(); ++i) +	LLInventoryModel::cat_array_t cat_array; +	LLInventoryModel::item_array_t wearable_array; +	LLInventoryFetchDescendentsObserver::folder_ref_t folders; +	 +	// Collect the contents of the Imported Clothing folder +	gInventory.collectDescendents(mImportedClothingID, cat_array, wearable_array,  +								  LLInventoryModel::EXCLUDE_TRASH); +	 +	for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin(); +		 iter != cat_array.end(); +		 ++iter) +	{ +		const LLViewerInventoryCategory *cat = iter->get(); +		 +		// Get the name of every imported outfit +		folders.push_back(cat->getUUID()); +		mImportedClothingFolders.push_back(std::make_pair(cat->getUUID(), cat->getName())); +	} +	 +	mCompleteFolders.clear(); +	fetchDescendents(folders); +	if (isEverythingComplete()) +	{ +		done(); +	} +} + +void LLLibraryOutfitsFetch::contentsDone(void) +{		 +	LLInventoryModel::cat_array_t cat_array; +	LLInventoryModel::item_array_t wearable_array; +	 +	for (cloth_folder_vec_t::const_iterator folder_iter = mImportedClothingFolders.begin(); +		 folder_iter != mImportedClothingFolders.end(); +		 ++folder_iter)  	{  		// First, make a folder in the My Outfits directory. -		const LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); -		LLUUID folder_id = gInventory.createNewCategory(parent_id, -														LLFolderType::FT_OUTFIT, -														mOutfits[i].second); -		LLAppearanceManager::getInstance()->shallowCopyCategory(mOutfits[i].first, folder_id, NULL); +		LLUUID new_outfit_folder_id = gInventory.createNewCategory(mMyOutfitsID, LLFolderType::FT_OUTFIT, folder_iter->second); +		 +		cat_array.clear(); +		wearable_array.clear(); +		// Collect the contents of each imported clothing folder, so we can create new outfit links for it +		gInventory.collectDescendents(folder_iter->first, cat_array, wearable_array,  +									  LLInventoryModel::EXCLUDE_TRASH); +		 +		for (LLInventoryModel::item_array_t::const_iterator wearable_iter = wearable_array.begin(); +			 wearable_iter != wearable_array.end(); +			 ++wearable_iter) +		{ +			const LLViewerInventoryItem *item = wearable_iter->get(); +			link_inventory_item(gAgent.getID(), +								item->getLinkedUUID(), +								new_outfit_folder_id, +								item->getName(), +								LLAssetType::AT_LINK, +								NULL); +		}  	} +  	mOutfitsPopulated = true;  } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e0356bc091..fb1bded795 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -313,6 +313,7 @@ void init_default_trans_args()  {  	default_trans_args.insert("SECOND_LIFE"); // World  	default_trans_args.insert("APP_NAME"); +	default_trans_args.insert("CAPITALIZED_APP_NAME");  	default_trans_args.insert("SECOND_LIFE_GRID");  	default_trans_args.insert("SUPPORT_SITE");  } diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index dac3280575..cda3e3a419 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -576,10 +576,10 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_  		style_params.font.style = "ITALIC";  		if (chat.mFromName.size() > 0) -			mEditor->appendText(chat.mFromName + " ", TRUE, style_params); +			mEditor->appendText(chat.mFromName, TRUE, style_params);  		// Ensure that message ends with NewLine, to avoid losing of new lines  		// while copy/paste from text chat. See EXT-3263. -		mEditor->appendText(chat.mText.substr(4) + NEW_LINE, FALSE, style_params); +		mEditor->appendText(chat.mText.substr(3) + NEW_LINE, FALSE, style_params);  	}  	else  	{ diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 60a37ac4af..9ce3f29853 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -170,10 +170,7 @@ void LLNearbyChatToastPanel::init(LLSD& notification)  	std::string str_sender; -	if(gAgentID != mFromID) -		str_sender = fromName; -	else -		str_sender = LLTrans::getString("You"); +	str_sender = fromName;  	str_sender+=" "; diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index 3042fbc6ec..0964ad7f91 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -64,6 +64,8 @@  // summary which only shows available & correct information  #define USE_SIMPLE_SUMMARY +const S32 SIZE_OF_ONE_KB = 1024; +  LLFloaterScriptLimits::LLFloaterScriptLimits(const LLSD& seed)  	: LLFloater(seed)  { @@ -130,7 +132,6 @@ void LLFloaterScriptLimits::refresh()  	}  } -  ///----------------------------------------------------------------------------  // Base class for panels  ///---------------------------------------------------------------------------- @@ -331,6 +332,57 @@ void LLPanelScriptLimitsRegionMemory::setErrorStatus(U32 status, const std::stri  	llerrs << "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<<llendl;  } +// callback from the name cache with an owner name to add to the list +void LLPanelScriptLimitsRegionMemory::onNameCache( +						 const LLUUID& id, +						 const std::string& first_name, +						 const std::string& last_name) +{ +	std::string name = first_name + " " + last_name; + +	LLScrollListCtrl *list = getChild<LLScrollListCtrl>("scripts_list");	 +	std::vector<LLSD>::iterator id_itor; +	for (id_itor = mObjectListItems.begin(); id_itor != mObjectListItems.end(); ++id_itor) +	{ +		LLSD element = *id_itor; +		if(element["owner_id"].asUUID() == id) +		{ +			LLScrollListItem* item = list->getItem(element["id"].asUUID()); + +			if(item) +			{ +				item->getColumn(2)->setValue(LLSD(name)); +				element["columns"][2]["value"] = name; +			} +		} +	} + +	// fill in the url's tab if needed, all urls must have memory so we can do it all here +	LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits"); +	if(instance) +	{ +		LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels"); +		LLPanelScriptLimitsRegionMemory* panel = (LLPanelScriptLimitsRegionMemory*)tab->getChild<LLPanel>("script_limits_region_urls_panel"); + +		LLScrollListCtrl *list = panel->getChild<LLScrollListCtrl>("scripts_list");	 +		std::vector<LLSD>::iterator id_itor; +		for (id_itor = mObjectListItems.begin(); id_itor != mObjectListItems.end(); ++id_itor) +		{ +			LLSD element = *id_itor; +			if(element["owner_id"].asUUID() == id) +			{ +				LLScrollListItem* item = list->getItem(element["id"].asUUID()); + +				if(item) +				{ +					item->getColumn(2)->setValue(LLSD(name)); +					element["columns"][2]["value"] = name; +				} +			} +		} +	} +} +  void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content)  {  	LLScrollListCtrl *list = getChild<LLScrollListCtrl>("scripts_list"); @@ -345,22 +397,40 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content)  	S32 total_objects = 0;  	S32 total_size = 0; +	std::vector<LLUUID> names_requested; +  	for(S32 i = 0; i < number_parcels; i++)  	{  		std::string parcel_name = content["parcels"][i]["name"].asString(); -		 +		LLUUID parcel_id = content["parcels"][i]["id"].asUUID();  		S32 number_objects = content["parcels"][i]["objects"].size();  		for(S32 j = 0; j < number_objects; j++)  		{ -			S32 size = content["parcels"][i]["objects"][j]["resources"]["memory"].asInteger() / 1024; +			S32 size = content["parcels"][i]["objects"][j]["resources"]["memory"].asInteger() / SIZE_OF_ONE_KB;  			total_size += size;  			std::string name_buf = content["parcels"][i]["objects"][j]["name"].asString();  			LLUUID task_id = content["parcels"][i]["objects"][j]["id"].asUUID(); +			LLUUID owner_id = content["parcels"][i]["objects"][j]["owner_id"].asUUID(); +			 +			std::string owner_buf; +			 +			BOOL name_is_cached = gCacheName->getFullName(owner_id, owner_buf); +			if(!name_is_cached) +			{ +				if(std::find(names_requested.begin(), names_requested.end(), owner_id) == names_requested.end()) +				{ +					names_requested.push_back(owner_id); +					gCacheName->get(owner_id, TRUE, +					boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache, +						this, _1, _2, _3)); +				} +			}  			LLSD element;  			element["id"] = task_id; +			element["owner_id"] = owner_id;  			element["columns"][0]["column"] = "size";  			element["columns"][0]["value"] = llformat("%d", size);  			element["columns"][0]["font"] = "SANSSERIF"; @@ -368,18 +438,18 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content)  			element["columns"][1]["value"] = name_buf;  			element["columns"][1]["font"] = "SANSSERIF";  			element["columns"][2]["column"] = "owner"; -			element["columns"][2]["value"] = ""; +			element["columns"][2]["value"] = owner_buf;  			element["columns"][2]["font"] = "SANSSERIF";  			element["columns"][3]["column"] = "location";  			element["columns"][3]["value"] = parcel_name;  			element["columns"][3]["font"] = "SANSSERIF"; -			list->addElement(element); -			mObjectListIDs.push_back(task_id); +			list->addElement(element, ADD_SORTED); +			mObjectListItems.push_back(element);  			total_objects++;  		}  	} -	 +  	mParcelMemoryUsed =total_size;  	mGotParcelMemoryUsed = TRUE;  	populateParcelMemoryText(); @@ -556,7 +626,7 @@ void LLPanelScriptLimitsRegionMemory::clearList()  	childSetValue("memory_used", LLSD(msg_empty_string));  	childSetValue("parcels_listed", LLSD(msg_empty_string)); -	mObjectListIDs.clear(); +	mObjectListItems.clear();  }  // static @@ -728,7 +798,7 @@ void LLPanelScriptLimitsRegionURLs::setRegionDetails(LLSD content)  	S32 total_objects = 0;  	S32 total_size = 0; - +	  	for(S32 i = 0; i < number_parcels; i++)  	{  		std::string parcel_name = content["parcels"][i]["name"].asString(); @@ -744,6 +814,10 @@ void LLPanelScriptLimitsRegionURLs::setRegionDetails(LLSD content)  				std::string name_buf = content["parcels"][i]["objects"][j]["name"].asString();  				LLUUID task_id = content["parcels"][i]["objects"][j]["id"].asUUID(); +				LLUUID owner_id = content["parcels"][i]["objects"][j]["owner_id"].asUUID(); + +				std::string owner_buf; +				gCacheName->getFullName(owner_id, owner_buf); //dont care if this fails as the memory tab will request and fill the field  				LLSD element; @@ -755,14 +829,14 @@ void LLPanelScriptLimitsRegionURLs::setRegionDetails(LLSD content)  				element["columns"][1]["value"] = name_buf;  				element["columns"][1]["font"] = "SANSSERIF";  				element["columns"][2]["column"] = "owner"; -				element["columns"][2]["value"] = ""; +				element["columns"][2]["value"] = owner_buf;  				element["columns"][2]["font"] = "SANSSERIF";  				element["columns"][3]["column"] = "location";  				element["columns"][3]["value"] = parcel_name;  				element["columns"][3]["font"] = "SANSSERIF";  				list->addElement(element); -				mObjectListIDs.push_back(task_id); +				mObjectListItems.push_back(element);  				total_objects++;  			}  		} @@ -868,7 +942,7 @@ void LLPanelScriptLimitsRegionURLs::clearList()  	childSetValue("urls_used", LLSD(msg_empty_string));  	childSetValue("parcels_listed", LLSD(msg_empty_string)); -	mObjectListIDs.clear(); +	mObjectListItems.clear();  }  // static @@ -982,7 +1056,7 @@ void LLPanelScriptLimitsAttachment::setAttachmentDetails(LLSD content)  			S32 size = 0;  			if(content["attachments"][i]["objects"][j]["resources"].has("memory"))  			{ -				size = content["attachments"][i]["objects"][j]["resources"]["memory"].asInteger(); +				size = content["attachments"][i]["objects"][j]["resources"]["memory"].asInteger() / SIZE_OF_ONE_KB;  			}  			S32 urls = 0;  			if(content["attachments"][i]["objects"][j]["resources"].has("urls")) @@ -1059,3 +1133,4 @@ void LLPanelScriptLimitsAttachment::onClickRefresh(void* userdata)  		return;  	}  } + diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h index 88239136e3..7e2b536eb6 100644 --- a/indra/newview/llfloaterscriptlimits.h +++ b/indra/newview/llfloaterscriptlimits.h @@ -54,12 +54,12 @@ public:  	// from LLPanel  	virtual void refresh(); -	 +  private: -	 +  	LLFloaterScriptLimits(const LLSD& seed);  	~LLFloaterScriptLimits(); -	 +  protected:  	LLTabContainer* mTab; @@ -167,13 +167,17 @@ public:  private: +	void onNameCache(	 const LLUUID& id, +						 const std::string& first_name, +						 const std::string& last_name); +  	LLUUID mParcelId;  	BOOL mGotParcelMemoryUsed;  	BOOL mGotParcelMemoryMax;  	S32 mParcelMemoryMax;  	S32 mParcelMemoryUsed; -	std::vector<LLUUID> mObjectListIDs; +	std::vector<LLSD> mObjectListItems;  protected: @@ -218,7 +222,7 @@ private:  	S32 mParcelURLsMax;  	S32 mParcelURLsUsed; -	std::vector<LLUUID> mObjectListIDs; +	std::vector<LLSD> mObjectListItems;  protected: diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index c6d9fee630..a7401fdb6f 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -32,6 +32,9 @@   */  #include "llviewerprecompiledheaders.h" + +#include "llcommandhandler.h" +#include "llfloaterreg.h"  #include "llfloatersearch.h"  #include "llmediactrl.h"  #include "lllogininstance.h" @@ -41,6 +44,42 @@  #include "llviewercontrol.h"  #include "llweb.h" +// support secondlife:///app/search/{CATEGORY}/{QUERY} SLapps +class LLSearchHandler : public LLCommandHandler +{ +public: +	// requires trusted browser to trigger +	LLSearchHandler() : LLCommandHandler("search", UNTRUSTED_THROTTLE) { } +	bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) +	{ +		const size_t parts = tokens.size(); + +		// get the (optional) category for the search +		std::string category; +		if (parts > 0) +		{ +			category = tokens[0].asString(); +		} + +		// get the (optional) search string +		std::string search_text; +		if (parts > 1) +		{ +			search_text = tokens[1].asString(); +		} + +		// create the LLSD arguments for the search floater +		LLSD args; +		args["category"] = category; +		args["id"] = LLURI::unescape(search_text); + +		// open the search floater and perform the requested search +		LLFloaterReg::showInstance("search", args); +		return true; +	} +}; +LLSearchHandler gSearchHandler; +  LLFloaterSearch::LLFloaterSearch(const LLSD& key) :  	LLFloater(key),  	LLViewerMediaObserver(), diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 41f4d1a663..1ea5868491 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -820,10 +820,11 @@ void LLFolderView::clearSelection()  	mSelectThisID.setNull();  } -BOOL LLFolderView::getSelectionList(std::set<LLUUID> &selection) +BOOL LLFolderView::getSelectionList(std::set<LLUUID> &selection) const  { -	selected_items_t::iterator item_it; -	for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) +	for (selected_items_t::const_iterator item_it = mSelectedItems.begin();  +		 item_it != mSelectedItems.end();  +		 ++item_it)  	{  		selection.insert((*item_it)->getListener()->getUUID());  	} diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 2598af4df4..89e1865e35 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -162,7 +162,7 @@ public:  	virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items); -	virtual BOOL getSelectionList(std::set<LLUUID> &selection); +	virtual BOOL getSelectionList(std::set<LLUUID> &selection) const;  	// make sure if ancestor is selected, descendents are not  	void sanitizeSelection(); diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 6f8c738a59..03bb296d29 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -237,7 +237,7 @@ public:  	virtual void recursiveDeselect(BOOL deselect_self);  	// gets multiple-element selection -	virtual BOOL getSelectionList(std::set<LLUUID> &selection){return TRUE;} +	virtual BOOL getSelectionList(std::set<LLUUID> &selection) const {return TRUE;}  	// Returns true is this object and all of its children can be removed (deleted by user)  	virtual BOOL isRemovable(); @@ -304,7 +304,7 @@ public:  	// Show children (unfortunate that this is called "open")  	virtual void setOpen(BOOL open = TRUE) {}; -	virtual BOOL isOpen() { return FALSE; } +	virtual BOOL isOpen() const { return FALSE; }  	virtual LLFolderView*	getRoot();  	BOOL			isDescendantOf( const LLFolderViewFolder* potential_ancestor ); @@ -499,7 +499,7 @@ public:  	virtual void setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse = RECURSE_NO);  	// Get the current state of the folder. -	virtual BOOL isOpen() { return mIsOpen; } +	virtual BOOL isOpen() const { return mIsOpen; }  	// special case if an object is dropped on the child.  	BOOL handleDragAndDropFromChild(MASK mask, diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index fdc5d14d97..b05568f353 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -595,7 +595,7 @@ void LLIMFloater::updateMessages()  			std::string time = msg["time"].asString();  			LLUUID from_id = msg["from_id"].asUUID(); -			std::string from = from_id != gAgentID ? msg["from"].asString() : LLTrans::getString("You"); +			std::string from = msg["from"].asString();  			std::string message = msg["message"].asString();  			LLChat chat; diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 72994a4371..a2b3a54f51 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -278,7 +278,7 @@ void LLInspectAvatar::onOpen(const LLSD& data)  	getChild<LLUICtrl>("gear_self_btn")->setVisible(self);  	getChild<LLUICtrl>("gear_btn")->setVisible(!self); -	 +  	// Position the inspector relative to the mouse cursor  	// Similar to how tooltips are positioned  	// See LLToolTipMgr::createToolTip @@ -518,13 +518,17 @@ void LLInspectAvatar::updateVolumeSlider()  	bool is_muted = LLMuteList::getInstance()->  						isMuted(mAvatarID, LLMute::flagVoiceChat);  	bool voice_enabled = gVoiceClient->getVoiceEnabled(mAvatarID); +	bool is_self = (mAvatarID == gAgent.getID());  	LLUICtrl* mute_btn = getChild<LLUICtrl>("mute_btn");  	mute_btn->setEnabled( voice_enabled );  	mute_btn->setValue( is_muted ); +	mute_btn->setVisible( voice_enabled && !is_self );  	LLUICtrl* volume_slider = getChild<LLUICtrl>("volume_slider");  	volume_slider->setEnabled( voice_enabled && !is_muted ); +	volume_slider->setVisible( voice_enabled && !is_self ); +  	const F32 DEFAULT_VOLUME = 0.5f;  	F32 volume;  	if (is_muted) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2a395d79dc..20d7f5214b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2074,7 +2074,12 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model  {  	if ("open" == action)  	{ -		openItem(); +		LLFolderViewFolder *f = dynamic_cast<LLFolderViewFolder *>(folder->getItemByID(mUUID)); +		if (f) +		{ +			f->setOpen(TRUE); +		} +		  		return;  	}  	else if ("paste" == action) diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index fc9654e9ad..92f19c9232 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -59,9 +59,6 @@ const static std::string NEW_LINE_SPACE_PREFIX("\n ");  const static std::string TWO_SPACES("  ");  const static std::string MULTI_LINE_PREFIX(" "); -//viewer 1.23 may have used "You" for Agent's entries -const static std::string YOU("You"); -  /**   *  Chat log lines - timestamp and name are optional but message text is mandatory.   * diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index e7043b2d00..fc0e51b76d 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -178,7 +178,7 @@ void	LLNearbyChat::addMessage(const LLChat& chat,bool archive)  	if (!chat.mMuted)  	{ -		tmp_chat.mFromName = chat.mFromID != gAgentID ? chat.mFromName : LLTrans::getString("You"); +		tmp_chat.mFromName = chat.mFromName;  		if (chat.mChatStyle == CHAT_STYLE_IRC)  		{ diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index f3d6dbbb46..fb898f7cdf 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -594,8 +594,8 @@ void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_g  		if (it != mGroups.begin())  			groups += ", "; -		 -		std::string group_url="[secondlife:///app/group/" + it->second.asString() + "/about " + it->first + "]"; +		std::string group_name = LLURI::escape(it->first); +		std::string group_url="[secondlife:///app/group/" + it->second.asString() + "/about " + group_name + "]";  		groups += group_url;  	} diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index a1c12412b5..550fee71bf 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -181,6 +181,10 @@ void LLPanelOutfitsInventory::onNew()  {  	const std::string& outfit_name = LLViewerFolderType::lookupNewCategoryName(LLFolderType::FT_OUTFIT);  	LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name); +	if (mAppearanceTabs) +	{ +		mAppearanceTabs->selectTabByName("outfitslist_tab"); +	}  }  void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action) @@ -412,8 +416,7 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)  		return (getCorrectListenerForAction() != NULL) && hasItemsSelected();  	} -	if (command_name == "wear" || -		command_name == "make_outfit") +	if (command_name == "wear")  	{  		const BOOL is_my_outfits = (mActivePanel->getName() == "outfitslist_tab");  		if (!is_my_outfits) @@ -421,6 +424,10 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)  			return FALSE;  		}  	} +	if (command_name == "make_outfit") +	{ +		return TRUE; +	}  	if (command_name == "edit" ||   		command_name == "add" diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 5e4dd8ff30..b103c48bd8 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -123,7 +123,10 @@ class LLViewerMediaImpl  {  	LOG_CLASS(LLViewerMediaImpl);  public: - +	 +	friend class LLViewerMedia; +	friend class LLMimeDiscoveryResponder; +	  	LLViewerMediaImpl(  		const LLUUID& texture_id,  		S32 media_width,  @@ -202,11 +205,15 @@ public:  	bool isMediaPaused();  	bool hasMedia() const;  	bool isMediaFailed() const { return mMediaSourceFailed; }; +	void setMediaFailed(bool val) { mMediaSourceFailed = val; }  	void resetPreviousMediaState();  	void setDisabled(bool disabled);  	bool isMediaDisabled() const { return mIsDisabled; }; - +	 +	void setInNearbyMediaList(bool in_list) { mInNearbyMediaList = in_list; } +	bool getInNearbyMediaList() { return mInNearbyMediaList; } +	  	// returns true if this instance should not be loaded (disabled, muted object, crashed, etc.)  	bool isForcedUnloaded() const; @@ -311,7 +318,7 @@ public:  	void setNavState(EMediaNavState state);  	void cancelMimeTypeProbe(); -public: +private:  	// a single media url with some data and an impl.  	LLPluginClassMedia* mMediaSource;  	LLUUID mTextureId; diff --git a/indra/newview/llviewerparcelmediaautoplay.cpp b/indra/newview/llviewerparcelmediaautoplay.cpp index 1b79b47905..ad2723b66b 100644 --- a/indra/newview/llviewerparcelmediaautoplay.cpp +++ b/indra/newview/llviewerparcelmediaautoplay.cpp @@ -35,6 +35,7 @@  #include "llviewerparcelmedia.h"  #include "llviewercontrol.h"  #include "llviewermedia.h" +#include "llviewerregion.h"  #include "llparcel.h"  #include "llviewerparcelmgr.h"  #include "lluuid.h" @@ -48,6 +49,8 @@ const F32 AUTOPLAY_SPEED = 0.1f;        // how slow should the agent be moving t  LLViewerParcelMediaAutoPlay::LLViewerParcelMediaAutoPlay() :  	LLEventTimer(1), +	 +	mLastParcelID(-1),  	mPlayed(FALSE),  	mTimeInParcel(0)  { @@ -81,9 +84,18 @@ void LLViewerParcelMediaAutoPlay::playStarted()  BOOL LLViewerParcelMediaAutoPlay::tick()  {  	LLParcel *this_parcel = NULL; +	LLViewerRegion *this_region = NULL;  	std::string this_media_url;  	LLUUID this_media_texture_id;  	S32 this_parcel_id = 0; +	LLUUID this_region_id; + +	this_region = gAgent.getRegion(); +	 +	if (this_region) +	{ +		this_region_id = this_region->getRegionID(); +	}  	this_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); @@ -96,12 +108,14 @@ BOOL LLViewerParcelMediaAutoPlay::tick()  		this_parcel_id = this_parcel->getLocalID();  	} -	if (this_parcel_id != mLastParcelID) +	if (this_parcel_id != mLastParcelID || +	    this_region_id != mLastRegionID)  	{  		// we've entered a new parcel  		mPlayed    = FALSE;                   // we haven't autoplayed yet  		mTimeInParcel = 0;                    // reset our timer  		mLastParcelID = this_parcel_id; +		mLastRegionID = this_region_id;  	}  	mTimeInParcel += mPeriod;                 // increase mTimeInParcel by the amount of time between ticks diff --git a/indra/newview/llviewerparcelmediaautoplay.h b/indra/newview/llviewerparcelmediaautoplay.h index 16279e7f1f..1d80b4756c 100644 --- a/indra/newview/llviewerparcelmediaautoplay.h +++ b/indra/newview/llviewerparcelmediaautoplay.h @@ -34,6 +34,7 @@  #define LLVIEWERPARCELMEDIAAUTOPLAY_H  #include "lltimer.h" +#include "lluuid.h"  // timer to automatically play media  class LLViewerParcelMediaAutoPlay : LLEventTimer @@ -47,6 +48,7 @@ class LLViewerParcelMediaAutoPlay : LLEventTimer   private:  	S32 mLastParcelID; +	LLUUID mLastRegionID;  	BOOL mPlayed;  	F32 mTimeInParcel;  }; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index f825eaa8ab..1edaeec848 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -3007,7 +3007,7 @@ void LLViewerMediaTexture::addFace(LLFace* facep)  	LLViewerTexture::addFace(facep) ;  	const LLTextureEntry* te = facep->getTextureEntry() ; -	if(te) +	if(te && te->getID().notNull())  	{  		LLViewerTexture* tex = gTextureList.findImage(te->getID()) ;  		if(tex) @@ -3024,7 +3024,10 @@ void LLViewerMediaTexture::addFace(LLFace* facep)  		return ;  	} -	llerrs << "The face does not have a valid texture before media texture." << llendl ; +	if(te && te->getID().notNull()) //should have a texture +	{ +		llerrs << "The face does not have a valid texture before media texture." << llendl ; +	}  }  //virtual  @@ -3033,7 +3036,7 @@ void LLViewerMediaTexture::removeFace(LLFace* facep)  	LLViewerTexture::removeFace(facep) ;  	const LLTextureEntry* te = facep->getTextureEntry() ; -	if(te) +	if(te && te->getID().notNull())  	{  		LLViewerTexture* tex = gTextureList.findImage(te->getID()) ;  		if(tex) @@ -3094,7 +3097,10 @@ void LLViewerMediaTexture::removeFace(LLFace* facep)  		}  	} -	llerrs << "mTextureList texture reference number is corrupted." << llendl ; +	if(te && te->getID().notNull()) //should have a texture +	{ +		llerrs << "mTextureList texture reference number is corrupted." << llendl ; +	}  }  void LLViewerMediaTexture::stopPlaying() @@ -3130,11 +3136,15 @@ void LLViewerMediaTexture::switchTexture(LLFace* facep)  			const LLTextureEntry* te = facep->getTextureEntry() ;  			if(te)  			{ -				LLViewerTexture* tex = gTextureList.findImage(te->getID()) ; +				LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID()) : NULL ;  				if(!tex && te->getID() != mID)//try parcel media.  				{  					tex = gTextureList.findImage(mID) ;  				} +				if(!tex) +				{ +					tex = LLViewerFetchedTexture::sDefaultImagep ; +				}  				facep->switchTexture(tex) ;  			}  		} diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 55609621b3..d23bcf9006 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1852,12 +1852,22 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index)  	if (mep && impl)  	{          std::string url = mep->getCurrentURL(); -        if (url.empty()) +		// If the url we're trying to "bounce back" to is either empty or not +		// allowed by the whitelist, try the home url.  If *that* doesn't work, +		// set the media as failed and unload it +        if (url.empty() || !mep->checkCandidateUrl(url))          {              url = mep->getHomeURL();          } -        if (! url.empty()) -        { +        if (url.empty() || !mep->checkCandidateUrl(url)) +		{ +			// The url to navigate back to is not good, and we have nowhere else +			// to go. +			LL_WARNS("MediaOnAPrim") << "FAILED to bounce back URL \"" << url << "\" -- unloading impl" << LL_ENDL; +			impl->setMediaFailed(true); +		} +		else { +			// Okay, navigate now              LL_INFOS("MediaOnAPrim") << "bouncing back to URL: " << url << LL_ENDL;              impl->navigateTo(url, "", false, true);          } diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 2ff99dcf5a..fac7aef690 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -6,7 +6,7 @@   name="floater_about"   help_topic="floater_about"   save_rect="true" - title="ABOUT [APP_NAME]" + title="ABOUT [CAPITALIZED_APP_NAME]"   width="470">    <floater.string       name="AboutHeader"> diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml index 953bd08dd4..f59badfcb4 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml @@ -47,7 +47,7 @@           label="Search"           layout="topleft"           left="6" -         help_topic="avatarpicker_search_tab" +         help_topic="avatarpicker"           name="SearchPanel"           top="150"           width="132"> @@ -98,7 +98,7 @@           label="Friends"           layout="topleft"           left="6" -         help_topic="avatarpicker_friends_tab" +         help_topic="avatarpicker"           name="FriendsPanel"           top="150"           width="132"> @@ -144,7 +144,7 @@           label="Near Me"           layout="topleft"           left="6" -         help_topic="avatarpicker_near_me_tab" +         help_topic="avatarpicker"           name="NearMePanel"           top="150"           width="132"> diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index a4ef807f06..b9649e9c57 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -8,6 +8,7 @@   min_height="122"   min_width="190"   name="floater_voice_controls" + help_topic="floater_voice_controls"   title="Voice Controls"   save_visibility="true"   single_instance="true" diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 690167bc33..a0dec346a4 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -223,6 +223,7 @@             parameter="test_inspectors" />          </menu_item_call>        </menu> +<!--        <menu_item_check           label="Reg In Client Test (restart)"           name="Reg In Client Test (restart)"> @@ -232,6 +233,7 @@                 function="ToggleControl"                 parameter="RegInClient" />        </menu_item_check> +-->        <menu_item_separator />        <menu_item_call         label="Set Window Size..." diff --git a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml index 970a2e6a8a..003e1baa7e 100644 --- a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml @@ -5,6 +5,7 @@   height="305"   layout="topleft"   name="block_list_panel" + help_topic="blocked_list"   min_height="350"   min_width="240"   width="280"> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 447901f984..f2f23a3847 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -8,6 +8,7 @@  	<!-- Default Args - these arguments will be replaced in all strings -->  	<string name="SECOND_LIFE">Second Life</string>  	<string name="APP_NAME">Second Life</string> +	<string name="CAPITALIZED_APP_NAME">SECOND LIFE</string>  	<string name="SECOND_LIFE_GRID">Second Life Grid</string>  	<string name="SUPPORT_SITE">Second Life Support Portal</string>  | 
