diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 531f527046..eb9d103524 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -403,6 +403,19 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
}
}
+ // FIRE-19340: search inventory by transferable permission
+ ////////////////////////////////////////////////////////////////////////////////
+ // FILTERTYPE_TRANSFERABLE
+ // Pass if this item is transferable
+ if (filterTypes & FILTERTYPE_TRANSFERABLE)
+ {
+ if ((listener->getPermissionMask() & PERM_TRANSFER) == 0)
+ {
+ return FALSE;
+ }
+ }
+ //
+
//
////////////////////////////////////////////////////////////////////////////////
// FILTERTYPE_WORN
@@ -1055,13 +1068,35 @@ void LLInventoryFilter::setFindAllLinksMode(const std::string &search_name, cons
}
//
-void LLInventoryFilter::setFilterWorn(BOOL sl)
+void LLInventoryFilter::setFilterWorn(BOOL worn)
{
setModified();
- mFilterOps.mFilterTypes |= FILTERTYPE_WORN;
+ if (worn)
+ {
+ mFilterOps.mFilterTypes |= FILTERTYPE_WORN;
+ }
+ else
+ {
+ mFilterOps.mFilterTypes &= ~FILTERTYPE_WORN;
+ }
}
//
+// FIRE-19340: search inventory by transferable permission
+void LLInventoryFilter::setFilterTransferable(BOOL transferable)
+{
+ setModified();
+ if (transferable)
+ {
+ mFilterOps.mFilterTypes |= FILTERTYPE_TRANSFERABLE;
+ }
+ else
+ {
+ mFilterOps.mFilterTypes &= ~FILTERTYPE_TRANSFERABLE;
+ }
+}
+//
+
void LLInventoryFilter::markDefault()
{
mDefaultFilterOps = mFilterOps;
@@ -1278,6 +1313,13 @@ const std::string& LLInventoryFilter::getFilterText()
mFilterText.erase(mFilterText.size() - 1, 1);
}
+ // FIRE-19340: search inventory by transferable permission
+ if (getFilterTransferable())
+ {
+ mFilterText += LLTrans::getString("Transfer Only");
+ }
+ //
+
if (isSinceLogoff())
{
mFilterText += LLTrans::getString("Since Logoff");
@@ -1297,6 +1339,8 @@ LLInventoryFilter& LLInventoryFilter::operator=( const LLInventoryFilter& othe
setFilterSubString(other.getFilterSubString());
setDateRangeLastLogoff(other.isSinceLogoff());
setFilterWorn(other.getFilterWorn());
+ // FIRE-19340: search inventory by transferable permission
+ setFilterTransferable(other.getFilterTransferable());
return *this;
}
@@ -1315,6 +1359,8 @@ void LLInventoryFilter::toParams(Params& params) const
params.filter_ops.date_search_direction = getDateSearchDirection();
params.filter_ops.show_folder_state = getShowFolderState();
params.filter_ops.permissions = getFilterPermissions();
+ // FIRE-19340: search inventory by transferable permission
+ params.filter_ops.transferable = getFilterTransferable();
params.substring = getFilterSubString();
params.since_logoff = isSinceLogoff();
}
@@ -1369,6 +1415,12 @@ void LLInventoryFilter::fromParams(const Params& params)
{
setFilterPermissions(params.filter_ops.permissions);
}
+ // FIRE-19340: search inventory by transferable permission
+ if (params.filter_ops.transferable.isProvided())
+ {
+ setFilterTransferable(params.filter_ops.transferable);
+ }
+ //
// FIRE-8947: Don't restore filter string on relog
//if (params.substring.isProvided())
//{
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index 65011799dd..9a8fac4ad3 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -59,6 +59,7 @@ public:
FILTERTYPE_MARKETPLACE_LISTING_FOLDER = 0x1 << 9, // pass iff folder is a listing folder
FILTERTYPE_NO_MARKETPLACE_ITEMS = 0x1 << 10, // pass iff folder is not under the marketplace
FILTERTYPE_WORN = 0x1 << 11, // search by wearable type
+ FILTERTYPE_TRANSFERABLE = 0x1 << 12 // FIRE-19340: search inventory by transferable permission
};
enum EFilterDateDirection
@@ -122,6 +123,7 @@ public:
Optional date_search_direction;
Optional show_folder_state;
Optional permissions;
+ Optional transferable; // FIRE-19340: search inventory by transferable permission
Params()
: types("filter_types", FILTERTYPE_OBJECT),
@@ -134,7 +136,8 @@ public:
hours_ago("hours_ago", 0),
date_search_direction("date_search_direction", FILTERDATEDIRECTION_NEWER),
show_folder_state("show_folder_state", SHOW_NON_EMPTY_FOLDERS),
- permissions("permissions", PERM_NONE)
+ permissions("permissions", PERM_NONE),
+ transferable("transferable", false) // FIRE-19340: search inventory by transferable permission
{}
};
@@ -227,8 +230,15 @@ public:
// sets params for Link-only search and backs up search settings for future restoration
void setFindAllLinksMode(const std::string &search_name, const LLUUID& search_id);
- void setFilterWorn(BOOL sl);
+ //
+ void setFilterWorn(BOOL worn);
BOOL getFilterWorn() const { return mFilterOps.mFilterTypes & FILTERTYPE_WORN; }
+ //
+
+ // FIRE-19340: search inventory by transferable permission
+ void setFilterTransferable(BOOL transferable);
+ BOOL getFilterTransferable() const { return mFilterOps.mFilterTypes & FILTERTYPE_TRANSFERABLE; }
+ //
// +-------------------------------------------------------------------+
// + Execution And Results
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 41ab8ca3e0..5a5104be36 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -406,7 +406,7 @@ void LLInventoryPanel::setFilterSubString(const std::string& string)
getFilter().setFilterSubString(string);
}
-// ## Zi: Extended Inventory Search
+// Extended Inventory Search
void LLInventoryPanel::setFilterSubStringTarget(const std::string& target)
{
getFilter().setFilterSubStringTarget(target);
@@ -416,7 +416,7 @@ LLInventoryFilter::EFilterSubstringTarget LLInventoryPanel::getFilterSubStringTa
{
return getFilter().getFilterSubStringTarget();
}
-// ## Zi: Extended Inventory Search
+// Extended Inventory Search
const std::string LLInventoryPanel::getFilterSubString()
{
@@ -461,12 +461,26 @@ void LLInventoryPanel::setFilterLinks(U64 filter_links)
getFilter().setFilterLinks(filter_links);
}
-// ## Zi: Filter Links Menu
+// Filter Links Menu
U64 LLInventoryPanel::getFilterLinks()
{
return getFilter().getFilterLinks();
}
-// ## Zi: Filter Links Menu
+// Filter Links Menu
+
+//
+void LLInventoryPanel::setWorn(BOOL worn)
+{
+ getFilter().setFilterWorn(worn);
+}
+//
+
+// FIRE-19340: search inventory by transferable permission
+void LLInventoryPanel::setTransferable(BOOL transferable)
+{
+ getFilter().setFilterTransferable(transferable);
+}
+//
void LLInventoryPanel::setShowFolderState(LLInventoryFilter::EFolderShow show)
{
@@ -1692,11 +1706,6 @@ LLInventoryRecentItemsPanel::LLInventoryRecentItemsPanel( const Params& params)
mInvFVBridgeBuilder = &RECENT_ITEMS_BUILDER;
}
-void LLInventoryPanel::setWorn(BOOL sl)
-{
- getFilter().setFilterWorn(sl);
-}
-
/************************************************************************/
/* Worn Inventory Panel related class */
/************************************************************************/
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index a685fbd6f5..5d9f87c035 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -179,16 +179,18 @@ public:
void setFilterWearableTypes(U64 filter);
void setFilterSubString(const std::string& string);
const std::string getFilterSubString();
- // ## Zi: Extended Inventory Search
+ // Extended Inventory Search
void setFilterSubStringTarget(const std::string& target);
LLInventoryFilter::EFilterSubstringTarget getFilterSubStringTarget() const;
- // ## Zi: Extended Inventory Search
+ // Extended Inventory Search
void setSinceLogoff(BOOL sl);
void setHoursAgo(U32 hours);
void setDateSearchDirection(U32 direction);
BOOL getSinceLogoff();
void setFilterLinks(U64 filter_links);
- U64 getFilterLinks(); // ## Zi: Filter Links Menu
+ U64 getFilterLinks(); // Filter Links Menu
+ void setWorn(BOOL worn); //
+ void setTransferable(BOOL transferable); // FIRE-19340: search inventory by transferable permission
void setShowFolderState(LLInventoryFilter::EFolderShow show);
LLInventoryFilter::EFolderShow getShowFolderState();
@@ -317,9 +319,6 @@ protected:
private:
bool mBuildDefaultHierarchy; // default inventory hierarchy should be created in postBuild()
bool mViewsInitialized; // Views have been generated
-
-public:
- void setWorn(BOOL sl);
};
#endif // LL_LLINVENTORYPANEL_H
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 8dbb5ce7b5..9ebf5222cf 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -889,9 +889,7 @@ void LLPanelMainInventory::draw()
mResortActivePanel = false;
}
LLPanel::draw();
- /// This really doesn't need updated every frame. changed() handles
- /// it whenever inventory changes.
- //updateItemcountText();
+ updateItemcountText();
}
void LLPanelMainInventory::updateItemcountText()
@@ -941,12 +939,12 @@ void LLPanelMainInventory::onFocusReceived()
void LLPanelMainInventory::setFilterTextFromFilter()
{
//mFilterText = mActivePanel->getFilter().getFilterText();
- // ## Zi: Filter dropdown
+ // Filter dropdown
// this method gets called by the filter subwindow (once every frame), so we update our combo box here
LLInventoryFilter &filter = mActivePanel->getFilter();
updateFilterDropdown(&filter);
mFilterText = filter.getFilterText();
- // ## Zi: Filter dropdown
+ // Filter dropdown
}
void LLPanelMainInventory::toggleFindOptions()
@@ -1116,6 +1114,7 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
getChild("check_sound")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SOUND));
getChild("check_texture")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_TEXTURE));
getChild("check_snapshot")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT));
+ getChild("check_transferable")->setValue(mFilter->getFilterTransferable()); // FIRE-19340: search inventory by transferable permission
getChild("check_show_empty")->setValue(show_folders == LLInventoryFilter::SHOW_ALL_FOLDERS);
getChild("check_since_logoff")->setValue(mFilter->isSinceLogoff());
mSpinSinceHours->set((F32)(hours % 24));
@@ -1236,6 +1235,8 @@ void LLFloaterInventoryFinder::draw()
mPanelMainInventory->getPanel()->setHoursAgo(hours);
mPanelMainInventory->getPanel()->setSinceLogoff(getCheckSinceLogoff());
+ // FIRE-19340: search inventory by transferable permission
+ mPanelMainInventory->getPanel()->setTransferable(getChild("check_transferable")->getValue().asBoolean());
mPanelMainInventory->setFilterTextFromFilter();
mPanelMainInventory->getPanel()->setDateSearchDirection(getDateSearchDirection());
@@ -1303,7 +1304,7 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data)
self->getChild("check_snapshot")->setValue(FALSE);
}
-// ## Zi: Inventory Collapse and Expand Buttons
+// Inventory Collapse and Expand Buttons
void LLPanelMainInventory::onCollapseButtonClicked()
{
// mFilterEditor->clear();
@@ -1315,7 +1316,7 @@ void LLPanelMainInventory::onExpandButtonClicked()
{
getPanel()->openAllFolders();
}
-// ## Zi: Inventory Collapse and Expand Buttons
+// Inventory Collapse and Expand Buttons
//////////////////////////////////////////////////////////////////////////////////
// List Commands //
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 4e6f155a8a..f3c8b16cc0 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -45,7 +45,7 @@ class LLMenuButton;
class LLMenuGL;
class LLToggleableMenu;
class LLFloater;
-class LLComboBox; // ## Zi: Filter dropdown
+class LLComboBox; // Filter dropdown
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLPanelMainInventory
@@ -87,10 +87,10 @@ public:
void setFocusFilterEditor();
- // ## Zi: Filter dropdown
+ // Filter dropdown
void onFilterTypeSelected(const std::string& filter_type_name);
void updateFilterDropdown(const LLInventoryFilter* filter);
- // ## Zi: Filter dropdown
+ // Filter dropdown
// FIRE-12808: Don't save filters during settings restore
static bool sSaveFilters;
@@ -123,19 +123,19 @@ protected:
void doCreate(const LLSD& userdata);
void resetFilters();
- // ## Zi: Sort By menu handlers
+ // Sort By menu handlers
void setSortBy(const LLSD& userdata);
BOOL isSortByChecked(const LLSD& userdata);
- // ## Zi: Sort By menu handlers
+ // Sort By menu handlers
void saveTexture(const LLSD& userdata);
bool isSaveTextureEnabled(const LLSD& userdata);
void updateItemcountText();
- // ## Zi: Inventory Collapse and Expand Buttons
+ // Inventory Collapse and Expand Buttons
void onCollapseButtonClicked();
void onExpandButtonClicked();
- // ## Zi: Inventory Collapse and Expand Buttons
+ // Inventory Collapse and Expand Buttons
void onFocusReceived();
private:
@@ -154,11 +154,11 @@ private:
std::string mItemCountString;
LLTextBox* mItemcountText;
- // ## Zi: Filter dropdown
+ // Filter dropdown
LLComboBox* mFilterComboBox;
std::map mFilterMap; // contains name-to-number mapping for dropdown filter types
U64 mFilterMask; // contains the cumulated bit filter for all dropdown filter types
- // ## Zi: Filter dropdown
+ // Filter dropdown
//////////////////////////////////////////////////////////////////////////////////
// List Commands //
@@ -173,16 +173,16 @@ protected:
BOOL isActionChecked(const LLSD& userdata);
void onCustomAction(const LLSD& command_name);
- // ## Zi: Filter Links Menu
+ // Filter Links Menu
BOOL isFilterLinksChecked(const LLSD& userdata);
void onFilterLinksChecked(const LLSD& userdata);
- // ## Zi: Filter Links Menu
+ // Filter Links Menu
- // ## Zi: Extended Inventory Search
+ // Extended Inventory Search
BOOL isSearchTargetChecked(const LLSD& userdata);
void onSearchTargetChecked(const LLSD& userdata);
LLInventoryFilter::EFilterSubstringTarget getSearchTarget() const;
- // ## Zi: Extended Inventory Search
+ // Extended Inventory Search
bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept);
/**
@@ -195,10 +195,10 @@ private:
LLMenuGL* mMenuAdd;
LLMenuButton* mGearMenuButton;
- // ## Zi: Inventory Collapse and Expand Buttons
+ // Inventory Collapse and Expand Buttons
LLButton* mCollapseBtn;
LLButton* mExpandBtn;
- // ## Zi: Inventory Collapse and Expand Buttons
+ // Inventory Collapse and Expand Buttons
bool mNeedUploadCost;
// List Commands //
diff --git a/indra/newview/skins/default/xui/de/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/de/floater_inventory_view_finder.xml
index 987c09c4fd..eb2ad51f25 100644
--- a/indra/newview/skins/default/xui/de/floater_inventory_view_finder.xml
+++ b/indra/newview/skins/default/xui/de/floater_inventory_view_finder.xml
@@ -14,6 +14,7 @@
+
diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml
index be798c3ecc..974fc9f452 100644
--- a/indra/newview/skins/default/xui/de/strings.xml
+++ b/indra/newview/skins/default/xui/de/strings.xml
@@ -1791,6 +1791,7 @@ Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
+
Inventar
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
index 677d4040f3..d82ef46d2d 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
@@ -2,7 +2,7 @@
+
+
Inventory