summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorybridge.h')
-rw-r--r--[-rwxr-xr-x]indra/newview/llinventorybridge.h69
1 files changed, 63 insertions, 6 deletions
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index f8ef15991d..03e19cc4da 100755..100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -37,6 +37,7 @@
#include "llviewerwearable.h"
#include "lltooldraganddrop.h"
#include "lllandmarklist.h"
+#include "llfolderviewitem.h"
class LLInventoryFilter;
class LLInventoryPanel;
@@ -76,6 +77,7 @@ public:
bool canShare() const;
bool canListOnMarketplace() const;
+ bool canListOnOutboxNow() const;
bool canListOnMarketplaceNow() const;
//--------------------------------------------------------------------
@@ -114,7 +116,7 @@ public:
virtual void move(LLFolderViewModelItem* new_parent_bridge) {}
virtual BOOL isItemCopyable() const { return FALSE; }
virtual BOOL copyToClipboard() const;
- virtual BOOL cutToClipboard() const;
+ virtual BOOL cutToClipboard();
virtual BOOL isClipboardPasteable() const;
virtual BOOL isClipboardPasteableAsLink() const;
virtual void pasteFromClipboard() {}
@@ -146,6 +148,9 @@ protected:
virtual void addOutboxContextMenuOptions(U32 flags,
menuentry_vec_t &items,
menuentry_vec_t &disabled_items);
+ virtual void addMarketplaceContextMenuOptions(U32 flags,
+ menuentry_vec_t &items,
+ menuentry_vec_t &disabled_items);
protected:
LLInvFVBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid);
@@ -160,6 +165,7 @@ protected:
BOOL isInboxFolder() const; // true if COF or descendant of marketplace inbox
BOOL isOutboxFolderDirectParent() const;
+ BOOL isMarketplaceListingsFolder() const; // true if descendant of Marketplace listings folder
const LLUUID getOutboxFolder() const;
virtual BOOL isItemPermissive() const;
@@ -172,6 +178,9 @@ protected:
const LLUUID& new_parent,
BOOL restamp);
void removeBatchNoCheck(std::vector<LLFolderViewModelItem*>& batch);
+
+ BOOL callback_cutToClipboard(const LLSD& notification, const LLSD& response);
+ BOOL perform_cutToClipboard();
public:
BOOL isOutboxFolder() const; // true if COF or descendant of marketplace outbox
@@ -187,6 +196,7 @@ protected:
mutable std::string mSearchableName;
void purgeItem(LLInventoryModel *model, const LLUUID &uuid);
+ void removeObject(LLInventoryModel *model, const LLUUID &uuid);
virtual void buildDisplayName() const {}
};
@@ -263,8 +273,10 @@ public:
mIsLoading(false)
{}
- BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg);
- BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop, std::string& tooltip_msg);
+ BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg, BOOL user_confirm = TRUE);
+ BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop, std::string& tooltip_msg, BOOL is_link = FALSE, BOOL user_confirm = TRUE);
+ void callback_dropItemIntoFolder(const LLSD& notification, const LLSD& response, LLInventoryItem* inv_item);
+ void callback_dropCategoryIntoFolder(const LLSD& notification, const LLSD& response, LLInventoryCategory* inv_category);
virtual void buildDisplayName() const;
@@ -279,10 +291,9 @@ public:
virtual LLUIImagePtr getIcon() const;
virtual LLUIImagePtr getIconOpen() const;
virtual LLUIImagePtr getIconOverlay() const;
-
static LLUIImagePtr getIcon(LLFolderType::EType preferred_type);
-
virtual std::string getLabelSuffix() const;
+ virtual LLFontGL::StyleFlags getLabelStyle() const;
virtual BOOL renameItem(const std::string& new_name);
@@ -354,12 +365,17 @@ public:
static LLHandle<LLFolderBridge> sSelf;
static void staticFolderOptionsMenu();
-private:
+protected:
+ void callback_pasteFromClipboard(const LLSD& notification, const LLSD& response);
+ void perform_pasteFromClipboard();
+ void gatherMessage(std::string& message, S32 depth, LLError::ELevel log_level);
+ LLUIImagePtr getFolderIcon(BOOL is_open) const;
bool mCallingCards;
bool mWearables;
bool mIsLoading;
LLTimer mTimeSinceRequestStart;
+ std::string mMessage;
LLRootHandle<LLFolderBridge> mHandle;
};
@@ -440,6 +456,7 @@ public:
const LLUUID& uuid) :
LLItemBridge(inventory, root, uuid) {}
virtual void openItem();
+ virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
};
class LLGestureBridge : public LLItemBridge
@@ -483,6 +500,7 @@ public:
virtual LLUIImagePtr getIcon() const;
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void openItem();
+ virtual BOOL isItemWearable() const { return TRUE; }
virtual std::string getLabelSuffix() const;
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual BOOL renameItem(const std::string& new_name);
@@ -515,6 +533,7 @@ public:
virtual LLUIImagePtr getIcon() const;
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void openItem();
+ virtual BOOL isItemWearable() const { return TRUE; }
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual std::string getLabelSuffix() const;
virtual BOOL renameItem(const std::string& new_name);
@@ -668,6 +687,31 @@ public:
U32 flags = 0x00) const;
};
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Marketplace Inventory Panel related classes
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+class LLMarketplaceFolderBridge : public LLFolderBridge
+{
+public:
+ // Overloads some display related methods specific to folders in a marketplace floater context
+ LLMarketplaceFolderBridge(LLInventoryPanel* inventory,
+ LLFolderView* root,
+ const LLUUID& uuid);
+
+ virtual LLUIImagePtr getIcon() const;
+ virtual LLUIImagePtr getIconOpen() const;
+ virtual std::string getLabelSuffix() const;
+ virtual LLFontGL::StyleFlags getLabelStyle() const;
+
+private:
+ LLUIImagePtr getMarketplaceFolderIcon(BOOL is_open) const;
+ // Those members are mutable because they are cached variablse to speed up display, not a state variables
+ mutable S32 m_depth;
+ mutable S32 m_stockCountCache;
+};
+
+
void rez_attachment(LLViewerInventoryItem* item,
LLViewerJointAttachment* attachment,
bool replace = false);
@@ -689,4 +733,17 @@ void hide_context_entries(LLMenuGL& menu,
const menuentry_vec_t &entries_to_show,
const menuentry_vec_t &disabled_entries);
+// Helper functions to classify actions.
+bool isAddAction(const std::string& action);
+bool isRemoveAction(const std::string& action);
+bool isMarketplaceCopyAction(const std::string& action);
+bool isMarketplaceSendAction(const std::string& action);
+
+class LLFolderViewGroupedItemBridge: public LLFolderViewGroupedItemModel
+{
+public:
+ LLFolderViewGroupedItemBridge();
+ virtual void groupFilterContextMenu(folder_view_item_deque& selected_items, LLMenuGL& menu);
+};
+
#endif // LL_LLINVENTORYBRIDGE_H