diff options
author | Merov Linden <merov@lindenlab.com> | 2014-07-24 17:42:44 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-07-24 17:42:44 -0700 |
commit | 83603fc939e60c602773cc87e0b6fa316359d467 (patch) | |
tree | 2471e8622548365b55ddd54367f1384a6c376d32 | |
parent | 87a7eee21d986e2a1c8b5fd467b5da06112690b5 (diff) |
DD-128 : Fixed! Recycled allow_open into allow_wear and use an extra virtual methods on bridge items to know if items are wearable or not.
-rw-r--r-- | indra/llui/llfolderviewitem.cpp | 6 | ||||
-rw-r--r-- | indra/llui/llfolderviewitem.h | 4 | ||||
-rwxr-xr-x | indra/llui/llfolderviewmodel.h | 2 | ||||
-rwxr-xr-x | indra/newview/llinventorybridge.h | 2 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/panel_marketplace_listings.xml | 4 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/panel_outbox_inventory.xml | 2 |
6 files changed, 14 insertions, 6 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index cef40351e1..42116251fb 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -104,7 +104,7 @@ LLFolderViewItem::Params::Params() item_height("item_height"), item_top_pad("item_top_pad"), creation_date(), - allow_open("allow_open", true), + allow_wear("allow_wear", true), font_color("font_color"), font_highlight_color("font_highlight_color"), left_pad("left_pad", 0), @@ -137,7 +137,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) mRoot(p.root), mViewModelItem(p.listener), mIsMouseOverTitle(false), - mAllowOpen(p.allow_open), + mAllowWear(p.allow_wear), mFontColor(p.font_color), mFontHighlightColor(p.font_highlight_color), mLeftPad(p.left_pad), @@ -454,7 +454,7 @@ void LLFolderViewItem::buildContextMenu(LLMenuGL& menu, U32 flags) void LLFolderViewItem::openItem( void ) { - if (mAllowOpen) + if (mAllowWear || !getViewModelItem()->isItemWearable()) { getViewModelItem()->openItem(); } diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index a9b0201236..12fba4f9b1 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -59,7 +59,7 @@ public: item_top_pad; Optional<time_t> creation_date; - Optional<bool> allow_open; + Optional<bool> allow_wear; Optional<LLUIColor> font_color; Optional<LLUIColor> font_highlight_color; @@ -117,7 +117,7 @@ protected: mIsCurSelection, mDragAndDropTarget, mIsMouseOverTitle, - mAllowOpen, + mAllowWear, mSelectPending; LLUIColor mFontColor; diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index 0b968ecee9..99c7c4013c 100755 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -156,6 +156,8 @@ public: virtual void openItem( void ) = 0; virtual void closeItem( void ) = 0; virtual void selectItem(void) = 0; + + virtual BOOL isItemWearable() const { return FALSE; } virtual BOOL isItemRenameable() const = 0; virtual BOOL renameItem(const std::string& new_name) = 0; diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 58fde0b63b..029a5395ca 100755 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -488,6 +488,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); @@ -520,6 +521,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); diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml index 0ebb7a5f48..18baa91acb 100755 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml @@ -95,6 +95,7 @@ border="false" bevel_style="none" show_item_link_overlays="true"> + <item allow_wear="false"/> </inventory_panel> <inventory_panel label="LISTED" @@ -115,6 +116,7 @@ border="false" bevel_style="none" show_item_link_overlays="true"> + <item allow_wear="false"/> </inventory_panel> <inventory_panel label="UNLISTED" @@ -135,6 +137,7 @@ border="false" bevel_style="none" show_item_link_overlays="true"> + <item allow_wear="false"/> </inventory_panel> <inventory_panel label="UNASSOCIATED" @@ -155,6 +158,7 @@ border="false" bevel_style="none" show_item_link_overlays="true"> + <item allow_wear="false"/> </inventory_panel> </tab_container> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml index c80e5b168a..e7d007ec3e 100755 --- a/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml @@ -28,5 +28,5 @@ text_pad_right="4" arrow_size="12" max_folder_item_overlap="2"/> - <item allow_open="false"/> + <item allow_wear="false"/> </inventory_panel> |