From d0e009f8c1fe8adffde079c40f008a60e180bb52 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 25 Jan 2016 09:07:58 +0100 Subject: [PATCH 1/5] FIRE-3302: "Add to Current Outfit" missing for inventory outfit folder --- indra/newview/llinventorybridge.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2d990a9020..89b9a8e103 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4413,10 +4413,14 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& // Only enable add/replace outfit for non-system folders. if (!is_system_folder) { + // FIRE-3302: "Add to Current Outfit" missing for inventory outfit folder + items.push_back(std::string("Add To Outfit")); + // Adding an outfit onto another (versus replacing) doesn't make sense. if (type != LLFolderType::FT_OUTFIT) { - items.push_back(std::string("Add To Outfit")); + // FIRE-3302: "Add to Current Outfit" missing for inventory outfit folder + //items.push_back(std::string("Add To Outfit")); // Patch: ReplaceWornItemsOnly items.push_back(std::string("Wear Items")); // From cb6814086e732f54ab7db55371b6f805166e7b33 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 25 Jan 2016 09:26:22 +0100 Subject: [PATCH 2/5] Fix some size_t types --- indra/newview/llinventorymodel.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 5f0c3ad270..ae32e992a7 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -3755,8 +3755,8 @@ void LLInventoryModel::wearWearablesOnAvatar(const LLUUID& category_id) mItemArray, LLInventoryModel::EXCLUDE_TRASH, is_wearable); - S32 i; - S32 wearable_count = mItemArray.size(); + size_t i; + size_t wearable_count = mItemArray.size(); if (wearable_count > 0) //Loop through wearables. { @@ -3786,13 +3786,13 @@ void LLInventoryModel::wearWearablesOnAvatar(const LLUUID& category_id) //take the first one from the list, since the list is diminishing. LLViewerWearable* wearable = gAgentWearables.getViewerWearable((LLWearableType::EType)iType,0); //if the item is from our folder - don't remove it - //for (LLViewerInventoryItem *item = item_array.get(i); if ( mItemArray.end() == std::find( mItemArray.begin(), mItemArray.end(), (LLViewerInventoryItem*)wearable ) ) { LLAppearanceMgr::instance().removeItemFromAvatar(wearable->getItemID()); } //LL_INFOS() << "Removing wearable name: " << wearable->getName() << LL_ENDL; } + //now add the first item (replace just in case) LLAppearanceMgr::instance().wearItemOnAvatar(item->getUUID(), true, true); //LL_INFOS() << " Wearing item: " << item->getName() << " with replace=true" << LL_ENDL; @@ -3827,8 +3827,8 @@ void LLInventoryModel::wearAttachmentsOnAvatar(const LLUUID& category_id) mObjArray, LLInventoryModel::EXCLUDE_TRASH, is_object); - S32 i; - S32 obj_count = mObjArray.size(); + size_t i; + size_t obj_count = mObjArray.size(); if (obj_count > 0) { @@ -3857,8 +3857,8 @@ void LLInventoryModel::wearGesturesOnAvatar(const LLUUID& category_id) gest_item_array, LLInventoryModel::EXCLUDE_TRASH, is_gesture); - S32 i; - S32 gest_count = gest_item_array.size(); + size_t i; + size_t gest_count = gest_item_array.size(); if (gest_count > 0) { @@ -3881,7 +3881,7 @@ void LLInventoryModel::wearAttachmentsOnAvatarCheckRemove(LLViewerObject *object LLUUID objID = object->getAttachmentItemID(); bool isObjectInList = false; - for (S32 i = 0; i < mObjArray.size(); ++i) + for (size_t i = 0; i < mObjArray.size(); ++i) { if (objID == (mObjArray.at(i))->getUUID()) { @@ -3891,7 +3891,7 @@ void LLInventoryModel::wearAttachmentsOnAvatarCheckRemove(LLViewerObject *object } //all attachment points - S32 obj_count = mObjArray.size(); + size_t obj_count = mObjArray.size(); if (isObjectInList && attachment != NULL) { @@ -3915,7 +3915,7 @@ void LLInventoryModel::wearAttachmentsOnAvatarCheckRemove(LLViewerObject *object //if any of those things aren't in our list - remove them bool isFound = false; - for (S32 j = 0; j < obj_count; ++j) + for (size_t j = 0; j < obj_count; ++j) { LLViewerInventoryItem *fold_item = mObjArray.at(j); if (att_id == fold_item->getUUID()) From 14f4e4bdba24c965643e467aca68373fa0247bd9 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 26 Jan 2016 12:34:37 +0100 Subject: [PATCH 3/5] FIRE-15755: Add options to area search to filter by owner permission and current agent parcel --- indra/newview/fsareasearch.cpp | 42 +++++++++++++++++++ indra/newview/fsareasearch.h | 16 +++++++ .../default/xui/de/floater_fs_area_search.xml | 4 ++ .../default/xui/en/floater_fs_area_search.xml | 36 ++++++++++++++-- 4 files changed, 95 insertions(+), 3 deletions(-) diff --git a/indra/newview/fsareasearch.cpp b/indra/newview/fsareasearch.cpp index 6225616d73..4e0ea3c8c6 100644 --- a/indra/newview/fsareasearch.cpp +++ b/indra/newview/fsareasearch.cpp @@ -112,6 +112,10 @@ FSAreaSearch::FSAreaSearch(const LLSD& key) : mFilterDistance(false), mFilterDistanceMin(0), mFilterDistanceMax(999999), + mFilterPermCopy(false), + mFilterPermModify(false), + mFilterPermTransfer(false), + mFilterAgentParcelOnly(false), mBeaconColor(), mBeaconTextColor(), mBeacons(false), @@ -836,6 +840,26 @@ void FSAreaSearch::matchObject(FSObjectProperties& details, LLViewerObject* obje } } + if (mFilterAgentParcelOnly && !LLViewerParcelMgr::instance().inAgentParcel(objectp->getPositionGlobal())) + { + return; + } + + if (mFilterPermCopy && !(details.owner_mask & PERM_COPY)) + { + return; + } + + if (mFilterPermModify && !(details.owner_mask & PERM_MODIFY)) + { + return; + } + + if (mFilterPermTransfer && !(details.owner_mask & PERM_TRANSFER)) + { + return; + } + //----------------------------------------------------------------------- // Find text //----------------------------------------------------------------------- @@ -2064,6 +2088,18 @@ BOOL FSPanelAreaSearchFilter::postBuild() mCheckboxMoaP = getChild("filter_moap"); mCheckboxMoaP->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); + mCheckboxPermCopy = getChild("filter_perm_copy"); + mCheckboxPermCopy->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); + + mCheckboxPermModify = getChild("filter_perm_modify"); + mCheckboxPermModify->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); + + mCheckboxPermTransfer = getChild("filter_perm_transfer"); + mCheckboxPermTransfer->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); + + mCheckboxAgentParcelOnly = getChild("filter_agent_parcel_only"); + mCheckboxAgentParcelOnly->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); + return LLPanel::postBuild(); } @@ -2124,6 +2160,12 @@ void FSPanelAreaSearchFilter::onCommitCheckbox() mFSAreaSearch->setExcludeChildPrims(mCheckboxExcludeChildPrim->get()); mFSAreaSearch->setExcludeNeighborRegions(mCheckboxExcludeNeighborRegions->get()); + + mFSAreaSearch->setFilterPermCopy(mCheckboxPermCopy->get()); + mFSAreaSearch->setFilterPermModify(mCheckboxPermModify->get()); + mFSAreaSearch->setFilterPermTransfer(mCheckboxPermTransfer->get()); + + mFSAreaSearch->setFilterAgentParcelOnly(mCheckboxAgentParcelOnly->get()); } void FSPanelAreaSearchFilter::onCommitSpin() diff --git a/indra/newview/fsareasearch.h b/indra/newview/fsareasearch.h index 030683104a..86d181f4f8 100644 --- a/indra/newview/fsareasearch.h +++ b/indra/newview/fsareasearch.h @@ -158,6 +158,12 @@ public: void setFilterDistanceMin(S32 s) { mFilterDistanceMin = s; } void setFilterDistanceMax(S32 s) { mFilterDistanceMax = s; } + void setFilterPermCopy(bool b) { mFilterPermCopy = b; } + void setFilterPermModify(bool b) { mFilterPermModify = b; } + void setFilterPermTransfer(bool b) { mFilterPermTransfer = b; } + + void setFilterAgentParcelOnly(bool b) { mFilterAgentParcelOnly = b; } + bool isActive() { return mActive; } private: @@ -243,6 +249,12 @@ private: bool mFilterClickAction; U8 mFilterClickActionType; + bool mFilterPermCopy; + bool mFilterPermModify; + bool mFilterPermTransfer; + + bool mFilterAgentParcelOnly; + protected: static void* createPanelList(void* data); static void* createPanelFind(void* data); @@ -380,6 +392,10 @@ private: LLCheckBoxCtrl* mCheckboxExcludetemporary; LLCheckBoxCtrl* mCheckboxExcludeChildPrim; LLCheckBoxCtrl* mCheckboxExcludeNeighborRegions; + LLCheckBoxCtrl* mCheckboxPermCopy; + LLCheckBoxCtrl* mCheckboxPermModify; + LLCheckBoxCtrl* mCheckboxPermTransfer; + LLCheckBoxCtrl* mCheckboxAgentParcelOnly; }; diff --git a/indra/newview/skins/default/xui/de/floater_fs_area_search.xml b/indra/newview/skins/default/xui/de/floater_fs_area_search.xml index 10e4ff7037..6219da5cba 100644 --- a/indra/newview/skins/default/xui/de/floater_fs_area_search.xml +++ b/indra/newview/skins/default/xui/de/floater_fs_area_search.xml @@ -59,6 +59,9 @@ + + + und @@ -82,6 +85,7 @@ und + Objekte mit diesen Eigenschaften ausschließen: diff --git a/indra/newview/skins/default/xui/en/floater_fs_area_search.xml b/indra/newview/skins/default/xui/en/floater_fs_area_search.xml index 16f510f4c2..759702a71c 100644 --- a/indra/newview/skins/default/xui/en/floater_fs_area_search.xml +++ b/indra/newview/skins/default/xui/en/floater_fs_area_search.xml @@ -4,7 +4,7 @@ help_topic="fs_area_search" title="Area Search for Objects" min_width="430" - min_height="355" + min_height="395" width="610" height="435" save_rect="true" @@ -353,6 +353,28 @@ label="Shared Media" left_pad="0" width="100"/> + + + + Exclude objects that are: @@ -552,7 +582,7 @@ name="exclude_neighbor_region" label="Neighboring Regions" width="80"/> -