summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorybridge.cpp14
-rw-r--r--indra/newview/llinventoryfilter.h7
-rw-r--r--indra/newview/llinventorymodel.h2
-rw-r--r--indra/newview/llinventorypanel.cpp5
-rw-r--r--indra/newview/llinventorypanel.h3
-rw-r--r--indra/newview/llviewerinventory.cpp14
-rw-r--r--indra/newview/llviewerinventory.h1
7 files changed, 30 insertions, 16 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 973257b19c..b9b4fa8b03 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -143,7 +143,6 @@ const std::string& LLInvFVBridge::getDisplayName() const
// Folders have full perms
PermissionMask LLInvFVBridge::getPermissionMask() const
{
-
return PERM_ALL;
}
@@ -1219,18 +1218,7 @@ PermissionMask LLItemBridge::getPermissionMask() const
{
LLViewerInventoryItem* item = getItem();
PermissionMask perm_mask = 0;
- if(item)
- {
- BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
- BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID());
- BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
- gAgent.getID());
-
- if (copy) perm_mask |= PERM_COPY;
- if (mod) perm_mask |= PERM_MODIFY;
- if (xfer) perm_mask |= PERM_TRANSFER;
-
- }
+ if (item) perm_mask = item->getPermissionMask();
return perm_mask;
}
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index 2376ba5d22..3ef51baefc 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -98,11 +98,15 @@ public:
void setHoursAgo(U32 hours);
U32 getHoursAgo() const;
+ void setIncludeLinks(BOOL include_links);
+ BOOL getIncludeLinks() const;
+
// +-------------------------------------------------------------------+
// + Execution And Results
// +-------------------------------------------------------------------+
BOOL check(const LLFolderViewItem* item);
- BOOL checkAgainstFilterType(const LLFolderViewItem* item);
+ BOOL checkAgainstFilterType(const LLFolderViewItem* item) const;
+ BOOL checkAgainstPermissions(const LLFolderViewItem* item) const;
std::string::size_type getStringMatchOffset() const;
// +-------------------------------------------------------------------+
@@ -172,6 +176,7 @@ private:
U32 mHoursAgo;
EFolderShow mShowFolderState;
PermissionMask mPermissions;
+ BOOL mIncludeLinks;
};
U32 mOrder;
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 5f5d4d6118..1f7bd50328 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -256,7 +256,7 @@ public:
// updateCategory() method to actually modify values.
LLViewerInventoryCategory* getCategory(const LLUUID& id) const;
- // Get the inventoryID that this item points to, else just return item_id.
+ // Get the inventoryID or item that this item points to, else just return object_id
const LLUUID& getLinkedItemID(const LLUUID& object_id) const;
private:
mutable LLPointer<LLViewerInventoryItem> mLastItem; // cache recent lookups
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 000bcdd265..4766c1c227 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -248,6 +248,11 @@ void LLInventoryPanel::setHoursAgo(U32 hours)
getFilter()->setHoursAgo(hours);
}
+void LLInventoryPanel::setIncludeLinks(BOOL include_links)
+{
+ getFilter()->setIncludeLinks(include_links);
+}
+
void LLInventoryPanel::setShowFolderState(LLInventoryFilter::EFolderShow show)
{
getFilter()->setShowFolderState(show);
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 160a3d6f23..4373cedf66 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -141,7 +141,8 @@ public:
void setSinceLogoff(BOOL sl);
void setHoursAgo(U32 hours);
BOOL getSinceLogoff();
-
+ void setIncludeLinks(BOOL include_links);
+
void setShowFolderState(LLInventoryFilter::EFolderShow show);
LLInventoryFilter::EFolderShow getShowFolderState();
void setAllowMultiSelect(BOOL allow) { mFolderRoot->setAllowMultiSelect(allow); }
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 49748c59e8..ac70be029a 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1653,6 +1653,20 @@ bool LLViewerInventoryItem::checkPermissionsSet(PermissionMask mask) const
return ((curr_mask & mask) == mask);
}
+PermissionMask LLViewerInventoryItem::getPermissionMask() const
+{
+ const LLPermissions& permissions = getPermissions();
+
+ BOOL copy = permissions.allowCopyBy(gAgent.getID());
+ BOOL mod = permissions.allowModifyBy(gAgent.getID());
+ BOOL xfer = permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID());
+ PermissionMask perm_mask = 0;
+ if (copy) perm_mask |= PERM_COPY;
+ if (mod) perm_mask |= PERM_MODIFY;
+ if (xfer) perm_mask |= PERM_TRANSFER;
+ return perm_mask;
+}
+
//----------
void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name)
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index f0dc7bcb67..8ab7c9710d 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -159,6 +159,7 @@ public:
// Checks the items permissions (for owner, group, or everyone) and returns true if all mask bits are set.
bool checkPermissionsSet(PermissionMask mask) const;
+ PermissionMask getPermissionMask() const;
// callback
void onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name);