diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-02-04 16:43:46 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-02-04 16:43:46 -0500 |
commit | 643b014fb858ec547663536dc649d845d2722ed2 (patch) | |
tree | e1ce1ac16881c61789909b1db1dd2ef6a7a95713 /indra/newview/llinventorybridge.h | |
parent | a93eb24e39458576475482b50ee0016fc4df50f9 (diff) |
EXT-4990 : "Find Original" should be enabled for links in the trash
EXT-4988 : Centralize right-click menu options when items are in trash
This change is a lot less scary than it looks. There is a bit of minor cosmetic cleanup (e.g. typedefing a commonly-used vector), and I've eliminated code duplication since, previously, every item/listener type had its own purge/restore item dialog; these are now handled in one central function.
I also moved "Find Original" above Purge/RestoreItem so that it appears first in the trash menu; this does not affect other menu options.
The functionality change from this checkin is to enable "Find Original" for link items in the trash.
Diffstat (limited to 'indra/newview/llinventorybridge.h')
-rw-r--r-- | indra/newview/llinventorybridge.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 6e256edc05..daa6dbeeba 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -107,13 +107,15 @@ struct LLAttachmentRezAction S32 mAttachPt; }; +typedef std::vector<std::string> menuentry_vec_t; + const std::string safe_inv_type_lookup(LLInventoryType::EType inv_type); void hide_context_entries(LLMenuGL& menu, - const std::vector<std::string> &entries_to_show, - const std::vector<std::string> &disabled_entries); + const menuentry_vec_t &entries_to_show, + const menuentry_vec_t &disabled_entries); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInvFVBridge (& it's derived classes) +// Class LLInvFVBridge (& its derived classes) // // Short for Inventory-Folder-View-Bridge. This is an // implementation class to be able to view inventory items. @@ -172,9 +174,11 @@ public: virtual BOOL isClipboardPasteableAsLink() const; virtual void pasteFromClipboard() {} virtual void pasteLinkFromClipboard() {} - void getClipboardEntries(bool show_asset_id, std::vector<std::string> &items, - std::vector<std::string> &disabled_items, U32 flags); + void getClipboardEntries(bool show_asset_id, menuentry_vec_t &items, + menuentry_vec_t &disabled_items, U32 flags); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual void addTrashContextMenuOptions(menuentry_vec_t &items, + menuentry_vec_t &disabled_items); virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; virtual BOOL dragOrDrop(MASK mask, BOOL drop, EDragAndDropType cargo_type, @@ -361,8 +365,8 @@ private: BOOL mCallingCards; BOOL mWearables; LLMenuGL* mMenu; - std::vector<std::string> mItems; - std::vector<std::string> mDisabledItems; + menuentry_vec_t mItems; + menuentry_vec_t mDisabledItems; }; // DEPRECATED @@ -816,7 +820,7 @@ void teleport_via_landmark(const LLUUID& asset_id); // Utility function to hide all entries except those in the list void hide_context_entries(LLMenuGL& menu, - const std::vector<std::string> &entries_to_show, - const std::vector<std::string> &disabled_entries); + const menuentry_vec_t &entries_to_show, + const menuentry_vec_t &disabled_entries); #endif // LL_LLINVENTORYBRIDGE_H |