summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-06-09 17:09:42 -0400
committerLoren Shih <seraph@lindenlab.com>2010-06-09 17:09:42 -0400
commite414a91d7fb8ffea664bf1c035cb0bab3c4ece7e (patch)
treec2ba504898e308cd20c3427089f13ed565fb3f36
parente24bfa78666788bc1e5179ff5d4ac3bf7d0a5491 (diff)
EXT-7430 : Create art overlay for inventory icons that are links
Took out explicit _Link icons and replaced with overlay. Removed links overlays from non-main-inventory-floater panels.
-rw-r--r--indra/newview/llfloaterbuy.cpp1
-rw-r--r--indra/newview/llfloaterbuycontents.cpp1
-rw-r--r--indra/newview/llfolderviewitem.cpp13
-rw-r--r--indra/newview/llfolderviewitem.h2
-rw-r--r--indra/newview/llinventorybridge.cpp32
-rw-r--r--indra/newview/llinventorybridge.h2
-rw-r--r--indra/newview/llinventoryicon.cpp82
-rw-r--r--indra/newview/llinventoryicon.h5
-rw-r--r--indra/newview/llinventoryitemslist.cpp4
-rw-r--r--indra/newview/llinventoryitemslist.h3
-rw-r--r--indra/newview/llinventorypanel.cpp9
-rw-r--r--indra/newview/llinventorypanel.h3
-rw-r--r--indra/newview/llpanelgroupnotices.cpp1
-rw-r--r--indra/newview/llpanelobjectinventory.cpp4
-rw-r--r--indra/newview/llwearableitemslist.cpp4
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Link.pngbin0 -> 2857 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml34
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml20
18 files changed, 87 insertions, 133 deletions
diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp
index 46b3695511..d359856443 100644
--- a/indra/newview/llfloaterbuy.cpp
+++ b/indra/newview/llfloaterbuy.cpp
@@ -254,7 +254,6 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(),
inv_item->getInventoryType(),
- inv_item->getIsLinkType(),
inv_item->getFlags(),
item_is_multi);
row["columns"][0]["column"] = "icon";
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index c35653178a..9bde3b1dac 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -223,7 +223,6 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(),
inv_item->getInventoryType(),
- inv_item->getIsLinkType(),
inv_item->getFlags(),
item_is_multi);
row["columns"][0]["column"] = "icon";
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 54e9bd5383..0c437cf035 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -96,6 +96,7 @@ void LLFolderViewItem::cleanupClass()
LLFolderViewItem::Params::Params()
: icon(),
icon_open(),
+ icon_overlay(),
root(),
listener(),
folder_arrow_image("folder_arrow_image"),
@@ -133,6 +134,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
mCreationDate(p.creation_date),
mIcon(p.icon),
mIconOpen(p.icon_open),
+ mIconOverlay(p.icon_overlay),
mListener(p.listener),
mHidden(false),
mShowLoadStatus(false)
@@ -617,6 +619,7 @@ const std::string& LLFolderViewItem::getSearchableLabel() const
LLViewerInventoryItem * LLFolderViewItem::getInventoryItem(void)
{
+ if (!getListener()) return NULL;
return gInventory.getItem(getListener()->getUUID());
}
@@ -948,7 +951,8 @@ void LLFolderViewItem::draw()
mDragAndDropTarget = FALSE;
}
-
+ const LLViewerInventoryItem *item = getInventoryItem();
+ const BOOL highlight_link = mIconOverlay && item && item->getIsLinkType();
//--------------------------------------------------------------------------------//
// Draw open icon
//
@@ -962,6 +966,10 @@ void LLFolderViewItem::draw()
mIcon->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1);
}
+ if (highlight_link)
+ {
+ mIconOverlay->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1);
+ }
//--------------------------------------------------------------------------------//
// Exit if no label to draw
@@ -972,8 +980,7 @@ void LLFolderViewItem::draw()
}
LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor;
- const LLViewerInventoryItem *item = getInventoryItem();
- if (item && item->getIsLinkType()) color = sLinkColor;
+ if (highlight_link) color = sLinkColor;
if (in_library) color = sLibraryColor;
F32 right_x = 0;
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index 57c722afa4..d6e4b2f556 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -97,6 +97,7 @@ public:
{
Optional<LLUIImage*> icon;
Optional<LLUIImage*> icon_open; // used for folders
+ Optional<LLUIImage*> icon_overlay; // for links
Optional<LLFolderView*> root;
Optional<LLFolderViewEventListener*> listener;
@@ -147,6 +148,7 @@ protected:
LLUIImagePtr mIcon;
std::string mStatusText;
LLUIImagePtr mIconOpen;
+ LLUIImagePtr mIconOverlay;
BOOL mHasVisibleChildren;
S32 mIndentation;
S32 mItemHeight;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 3a9c5ba698..d82f96bc25 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2255,18 +2255,8 @@ LLUIImagePtr LLFolderBridge::getIcon() const
}
// static
-LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type, BOOL is_link)
+LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type)
{
- // Bypassing LLViewerFolderType::lookup() since
- // we aren't using different system folder icons
- if (is_link)
- {
- if (preferred_type == LLFolderType::FT_OUTFIT)
- return LLUI::getUIImage("Inv_LookFolderClosed_Link");
- else
- return LLUI::getUIImage("Inv_FolderClosed_Link");
- }
-
switch (preferred_type)
{
case LLFolderType::FT_OUTFIT:
@@ -2286,14 +2276,6 @@ LLUIImagePtr LLFolderBridge::getOpenIcon() const
{
// Bypassing LLViewerFolderType::lookup() since
// we aren't using different system folder icons
- if (isLink())
- {
- if (getPreferredType() == LLFolderType::FT_OUTFIT)
- return LLUI::getUIImage("Inv_LookFolderOpen_Link");
- else
- return LLUI::getUIImage("Inv_FolderOpen_Link");
- }
-
switch (getPreferredType())
{
case LLFolderType::FT_OUTFIT:
@@ -3176,7 +3158,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
LLUIImagePtr LLTextureBridge::getIcon() const
{
- return LLInventoryIcon::getIcon(LLAssetType::AT_TEXTURE, mInvType, mIsLink);
+ return LLInventoryIcon::getIcon(LLAssetType::AT_TEXTURE, mInvType);
}
void LLTextureBridge::openItem()
@@ -3328,7 +3310,7 @@ LLLandmarkBridge::LLLandmarkBridge(LLInventoryPanel* inventory,
LLUIImagePtr LLLandmarkBridge::getIcon() const
{
- return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mIsLink, mVisited, FALSE);
+ return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, FALSE);
}
void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
@@ -3520,7 +3502,7 @@ LLUIImagePtr LLCallingCardBridge::getIcon() const
{
online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID());
}
- return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, mIsLink, online, FALSE);
+ return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, FALSE);
}
std::string LLCallingCardBridge::getLabelSuffix() const
@@ -3959,7 +3941,7 @@ LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory,
LLUIImagePtr LLObjectBridge::getIcon() const
{
- return LLInventoryIcon::getIcon(LLAssetType::AT_OBJECT, mInvType, mIsLink, mAttachPt, mIsMultiObject);
+ return LLInventoryIcon::getIcon(LLAssetType::AT_OBJECT, mInvType, mAttachPt, mIsMultiObject);
}
LLInventoryObject* LLObjectBridge::getObject() const
@@ -4426,7 +4408,7 @@ std::string LLWearableBridge::getLabelSuffix() const
LLUIImagePtr LLWearableBridge::getIcon() const
{
- return LLInventoryIcon::getIcon(mAssetType, mInvType, mIsLink, mWearableType, FALSE);
+ return LLInventoryIcon::getIcon(mAssetType, mInvType, mWearableType, FALSE);
}
// virtual
@@ -4851,7 +4833,7 @@ LLUIImagePtr LLLinkFolderBridge::getIcon() const
}
}
}
- return LLFolderBridge::getIcon(folder_type, TRUE);
+ return LLFolderBridge::getIcon(folder_type);
}
void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index a342a2da14..d97dfd535e 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -245,7 +245,7 @@ public:
virtual LLFolderType::EType getPreferredType() const;
virtual LLUIImagePtr getIcon() const;
virtual LLUIImagePtr getOpenIcon() const;
- static LLUIImagePtr getIcon(LLFolderType::EType preferred_type, BOOL is_link = FALSE);
+ static LLUIImagePtr getIcon(LLFolderType::EType preferred_type);
virtual BOOL renameItem(const std::string& new_name);
diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp
index 2fb55f4c1f..3090371a73 100644
--- a/indra/newview/llinventoryicon.cpp
+++ b/indra/newview/llinventoryicon.cpp
@@ -40,13 +40,10 @@
struct IconEntry : public LLDictionaryEntry
{
- IconEntry(const std::string &item_name,
- const std::string &link_name)
+ IconEntry(const std::string &item_name)
:
- LLDictionaryEntry(item_name),
- mLinkName(link_name)
+ LLDictionaryEntry(item_name)
{}
- const std::string mLinkName;
};
class LLIconDictionary : public LLSingleton<LLIconDictionary>,
@@ -58,52 +55,51 @@ public:
LLIconDictionary::LLIconDictionary()
{
- addEntry(LLInventoryIcon::ICONNAME_TEXTURE, new IconEntry("Inv_Texture", "Inv_Texture_Link"));
- addEntry(LLInventoryIcon::ICONNAME_SOUND, new IconEntry("Inv_Texture", "Inv_Texture_Link"));
- addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_ONLINE, new IconEntry("Inv_CallingCard", "Inv_CallingCard_Link"));
- addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_OFFLINE, new IconEntry("Inv_CallingCard", "Inv_CallingCard_Link"));
- addEntry(LLInventoryIcon::ICONNAME_LANDMARK, new IconEntry("Inv_Landmark", "Inv_Landmark_Link"));
- addEntry(LLInventoryIcon::ICONNAME_LANDMARK_VISITED, new IconEntry("Inv_Landmark", "Inv_Landmark_Link"));
- addEntry(LLInventoryIcon::ICONNAME_SCRIPT, new IconEntry("Inv_Script", "Inv_Script_Link"));
- addEntry(LLInventoryIcon::ICONNAME_CLOTHING, new IconEntry("Inv_Clothing", "Inv_Clothing_Link"));
- addEntry(LLInventoryIcon::ICONNAME_OBJECT, new IconEntry("Inv_Object", "Inv_Object_Link"));
- addEntry(LLInventoryIcon::ICONNAME_OBJECT_MULTI, new IconEntry("Inv_Object_Multi", "Inv_Object_Multi_Link"));
- addEntry(LLInventoryIcon::ICONNAME_NOTECARD, new IconEntry("Inv_Notecard", "Inv_Notecard_Link"));
- addEntry(LLInventoryIcon::ICONNAME_BODYPART, new IconEntry("Inv_Skin", "Inv_Skin_Link"));
- addEntry(LLInventoryIcon::ICONNAME_SNAPSHOT, new IconEntry("Inv_Snapshot", "Inv_Snapshot_Link"));
+ addEntry(LLInventoryIcon::ICONNAME_TEXTURE, new IconEntry("Inv_Texture"));
+ addEntry(LLInventoryIcon::ICONNAME_SOUND, new IconEntry("Inv_Texture"));
+ addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_ONLINE, new IconEntry("Inv_CallingCard"));
+ addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_OFFLINE, new IconEntry("Inv_CallingCard"));
+ addEntry(LLInventoryIcon::ICONNAME_LANDMARK, new IconEntry("Inv_Landmark"));
+ addEntry(LLInventoryIcon::ICONNAME_LANDMARK_VISITED, new IconEntry("Inv_Landmark"));
+ addEntry(LLInventoryIcon::ICONNAME_SCRIPT, new IconEntry("Inv_Script"));
+ addEntry(LLInventoryIcon::ICONNAME_CLOTHING, new IconEntry("Inv_Clothing"));
+ addEntry(LLInventoryIcon::ICONNAME_OBJECT, new IconEntry("Inv_Object"));
+ addEntry(LLInventoryIcon::ICONNAME_OBJECT_MULTI, new IconEntry("Inv_Object_Multi"));
+ addEntry(LLInventoryIcon::ICONNAME_NOTECARD, new IconEntry("Inv_Notecard"));
+ addEntry(LLInventoryIcon::ICONNAME_BODYPART, new IconEntry("Inv_Skin"));
+ addEntry(LLInventoryIcon::ICONNAME_SNAPSHOT, new IconEntry("Inv_Snapshot"));
- addEntry(LLInventoryIcon::ICONNAME_BODYPART_SHAPE, new IconEntry("Inv_BodyShape", "Inv_BodyShape_Link"));
- addEntry(LLInventoryIcon::ICONNAME_BODYPART_SKIN, new IconEntry("Inv_Skin", "Inv_Skin_Link"));
- addEntry(LLInventoryIcon::ICONNAME_BODYPART_HAIR, new IconEntry("Inv_Hair", "Inv_Hair_Link"));
- addEntry(LLInventoryIcon::ICONNAME_BODYPART_EYES, new IconEntry("Inv_Eye", "Inv_Eye_Link"));
+ addEntry(LLInventoryIcon::ICONNAME_BODYPART_SHAPE, new IconEntry("Inv_BodyShape"));
+ addEntry(LLInventoryIcon::ICONNAME_BODYPART_SKIN, new IconEntry("Inv_Skin"));
+ addEntry(LLInventoryIcon::ICONNAME_BODYPART_HAIR, new IconEntry("Inv_Hair"));
+ addEntry(LLInventoryIcon::ICONNAME_BODYPART_EYES, new IconEntry("Inv_Eye"));
- addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHIRT, new IconEntry("Inv_Shirt", "Inv_Shirt_Link"));
- addEntry(LLInventoryIcon::ICONNAME_CLOTHING_PANTS, new IconEntry("Inv_Pants", "Inv_Pants_Link"));
- addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHOES, new IconEntry("Inv_Shoe", "Inv_Shoe_Link"));
- addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SOCKS, new IconEntry("Inv_Socks", "Inv_Socks_Link"));
- addEntry(LLInventoryIcon::ICONNAME_CLOTHING_JACKET, new IconEntry("Inv_Jacket", "Inv_Jacket_Link"));
- addEntry(LLInventoryIcon::ICONNAME_CLOTHING_GLOVES, new IconEntry("Inv_Gloves", "Inv_Gloves_Link"));
- addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT, new IconEntry("Inv_Undershirt", "Inv_Undershirt_Link"));
- addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS, new IconEntry("Inv_Underpants", "Inv_Underpants_Link"));
- addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SKIRT, new IconEntry("Inv_Skirt", "Inv_Skirt_Link"));
- addEntry(LLInventoryIcon::ICONNAME_CLOTHING_ALPHA, new IconEntry("Inv_Alpha", "Inv_Alpha_Link"));
- addEntry(LLInventoryIcon::ICONNAME_CLOTHING_TATTOO, new IconEntry("Inv_Tattoo", "Inv_Tattoo_Link"));
- addEntry(LLInventoryIcon::ICONNAME_ANIMATION, new IconEntry("Inv_Animation", "Inv_Animation_Link"));
- addEntry(LLInventoryIcon::ICONNAME_GESTURE, new IconEntry("Inv_Gesture", "Inv_Gesture_Link"));
+ addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHIRT, new IconEntry("Inv_Shirt"));
+ addEntry(LLInventoryIcon::ICONNAME_CLOTHING_PANTS, new IconEntry("Inv_Pants"));
+ addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHOES, new IconEntry("Inv_Shoe"));
+ addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SOCKS, new IconEntry("Inv_Socks"));
+ addEntry(LLInventoryIcon::ICONNAME_CLOTHING_JACKET, new IconEntry("Inv_Jacket"));
+ addEntry(LLInventoryIcon::ICONNAME_CLOTHING_GLOVES, new IconEntry("Inv_Gloves"));
+ addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT, new IconEntry("Inv_Undershirt"));
+ addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS, new IconEntry("Inv_Underpants"));
+ addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SKIRT, new IconEntry("Inv_Skirt"));
+ addEntry(LLInventoryIcon::ICONNAME_CLOTHING_ALPHA, new IconEntry("Inv_Alpha"));
+ addEntry(LLInventoryIcon::ICONNAME_CLOTHING_TATTOO, new IconEntry("Inv_Tattoo"));
+ addEntry(LLInventoryIcon::ICONNAME_ANIMATION, new IconEntry("Inv_Animation"));
+ addEntry(LLInventoryIcon::ICONNAME_GESTURE, new IconEntry("Inv_Gesture"));
- addEntry(LLInventoryIcon::ICONNAME_LINKITEM, new IconEntry("Inv_LinkItem", "Inv_LinkItem"));
- addEntry(LLInventoryIcon::ICONNAME_LINKFOLDER, new IconEntry("Inv_LinkItem", "Inv_LinkItem"));
+ addEntry(LLInventoryIcon::ICONNAME_LINKITEM, new IconEntry("Inv_LinkItem"));
+ addEntry(LLInventoryIcon::ICONNAME_LINKFOLDER, new IconEntry("Inv_LinkItem"));
- addEntry(LLInventoryIcon::ICONNAME_NONE, new IconEntry("NONE", "NONE"));
+ addEntry(LLInventoryIcon::ICONNAME_NONE, new IconEntry("NONE"));
}
LLUIImagePtr LLInventoryIcon::getIcon(LLAssetType::EType asset_type,
LLInventoryType::EType inventory_type,
- BOOL item_is_link,
U32 misc_flag,
BOOL item_is_multi)
{
- const std::string& icon_name = getIconName(asset_type, inventory_type, item_is_link, misc_flag, item_is_multi);
+ const std::string& icon_name = getIconName(asset_type, inventory_type, misc_flag, item_is_multi);
return LLUI::getUIImage(icon_name);
}
@@ -114,7 +110,6 @@ LLUIImagePtr LLInventoryIcon::getIcon(EIconName idx)
const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type,
LLInventoryType::EType inventory_type,
- BOOL item_is_link,
U32 misc_flag,
BOOL item_is_multi)
{
@@ -169,14 +164,13 @@ const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type,
break;
}
- return getIconName(idx, item_is_link);
+ return getIconName(idx);
}
-const std::string& LLInventoryIcon::getIconName(EIconName idx, BOOL item_is_link)
+const std::string& LLInventoryIcon::getIconName(EIconName idx)
{
const IconEntry *entry = LLIconDictionary::instance().lookup(idx);
- if (item_is_link) return entry->mLinkName;
return entry->mName;
}
diff --git a/indra/newview/llinventoryicon.h b/indra/newview/llinventoryicon.h
index 4cb7a123c4..6e29012c4c 100644
--- a/indra/newview/llinventoryicon.h
+++ b/indra/newview/llinventoryicon.h
@@ -86,15 +86,12 @@ public:
static const std::string& getIconName(LLAssetType::EType asset_type,
LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE,
- BOOL item_is_link = FALSE,
U32 misc_flag = 0, // different meanings depending on item type
BOOL item_is_multi = FALSE);
- static const std::string& getIconName(EIconName idx,
- BOOL item_is_link = FALSE);
+ static const std::string& getIconName(EIconName idx);
static LLUIImagePtr getIcon(LLAssetType::EType asset_type,
LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE,
- BOOL item_is_link = FALSE,
U32 misc_flag = 0, // different meanings depending on item type
BOOL item_is_multi = FALSE);
static LLUIImagePtr getIcon(EIconName idx);
diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp
index cd0e976a79..3e5f8d9848 100644
--- a/indra/newview/llinventoryitemslist.cpp
+++ b/indra/newview/llinventoryitemslist.cpp
@@ -132,8 +132,7 @@ BOOL LLPanelInventoryListItemBase::postBuild()
setIconCtrl(getChild<LLIconCtrl>("item_icon"));
setTitleCtrl(getChild<LLTextBox>("item_name"));
- BOOL show_links = mForceNoLinksOnIcons ? FALSE : mItem->getIsLinkType();
- mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), show_links, mItem->getFlags(), FALSE);
+ mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), mItem->getFlags(), FALSE);
setNeedsRefresh(true);
@@ -199,7 +198,6 @@ LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem
, mLeftWidgetsWidth(0)
, mRightWidgetsWidth(0)
, mNeedsRefresh(false)
-, mForceNoLinksOnIcons(false)
{
}
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index 2c60d38cb5..c1b1a6f281 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -182,9 +182,6 @@ protected:
LLViewerInventoryItem* mItem;
- // force not showing link icon on item's icon
- bool mForceNoLinksOnIcons;
-
private:
/** reshape left side widgets
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index bb3f34dde2..7d81cf18aa 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -87,6 +87,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mSortOrderSetting(p.sort_order_setting),
mInventory(p.inventory),
mAllowMultiSelect(p.allow_multi_select),
+ mShowItemLinkOverlays(p.show_item_link_overlays),
mViewsInitialized(false),
mStartFolderString(p.start_folder),
mBuildDefaultHierarchy(true),
@@ -522,6 +523,10 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
params.name = new_listener->getDisplayName();
params.icon = new_listener->getIcon();
params.icon_open = new_listener->getOpenIcon();
+ if (mShowItemLinkOverlays) // if false, then links show up just like normal items
+ {
+ params.icon_overlay = LLUI::getUIImage("Inv_Link");
+ }
params.root = mFolderRoot;
params.listener = new_listener;
params.tool_tip = params.name;
@@ -560,6 +565,10 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
params.name = new_listener->getDisplayName();
params.icon = new_listener->getIcon();
params.icon_open = new_listener->getOpenIcon();
+ if (mShowItemLinkOverlays) // if false, then links show up just like normal items
+ {
+ params.icon_overlay = LLUI::getUIImage("Inv_Link");
+ }
params.creation_date = new_listener->getCreationDate();
params.root = mFolderRoot;
params.listener = new_listener;
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 4373cedf66..67c8904868 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -84,6 +84,7 @@ public:
Optional<std::string> sort_order_setting;
Optional<LLInventoryModel*> inventory;
Optional<bool> allow_multi_select;
+ Optional<bool> show_item_link_overlays;
Optional<Filter> filter;
Optional<std::string> start_folder;
@@ -91,6 +92,7 @@ public:
: sort_order_setting("sort_order_setting"),
inventory("", &gInventory),
allow_multi_select("allow_multi_select", true),
+ show_item_link_overlays("show_item_link_overlays", false),
filter("filter"),
start_folder("start_folder")
{}
@@ -177,6 +179,7 @@ protected:
LLInventoryModel* mInventory;
LLInventoryObserver* mInventoryObserver;
BOOL mAllowMultiSelect;
+ BOOL mShowItemLinkOverlays; // Shows link graphic over inventory item icons
LLFolderView* mFolderRoot;
LLScrollContainer* mScroller;
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 42ff514f09..ba50081fb2 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -338,7 +338,6 @@ void LLPanelGroupNotices::setItem(LLPointer<LLInventoryItem> inv_item)
std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(),
inv_item->getInventoryType(),
inv_item->getFlags(),
- inv_item->getIsLinkType(),
item_is_multi );
mCreateInventoryIcon->setValue(icon_name);
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index c557e9b85d..ad3a5c2380 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -351,7 +351,7 @@ LLUIImagePtr LLTaskInvFVBridge::getIcon() const
{
const BOOL item_is_multi = (mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS);
- return LLInventoryIcon::getIcon(mAssetType, mInventoryType, FALSE, 0, item_is_multi );
+ return LLInventoryIcon::getIcon(mAssetType, mInventoryType, 0, item_is_multi );
}
void LLTaskInvFVBridge::openItem()
@@ -1236,7 +1236,7 @@ public:
LLUIImagePtr LLTaskWearableBridge::getIcon() const
{
- return LLInventoryIcon::getIcon(mAssetType, mInventoryType, FALSE, mFlags, FALSE );
+ return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, FALSE );
}
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 6c410cf7a5..d56a331000 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -89,8 +89,6 @@ void LLPanelWearableListItem::onMouseLeave(S32 x, S32 y, MASK mask)
LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item)
: LLPanelInventoryListItemBase(item)
{
- // icons should not be shown for this type of items (EXT-7511)
- mForceNoLinksOnIcons = true;
}
//////////////////////////////////////////////////////////////////////////
@@ -309,7 +307,7 @@ BOOL LLPanelDummyClothingListItem::postBuild()
addWidgetToRightSide("btn_add");
- setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, FALSE, mWearableType, FALSE));
+ setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, FALSE));
updateItem();
// Make it look loke clothing item - reserve space for 'delete' button
diff --git a/indra/newview/skins/default/textures/icons/Inv_Link.png b/indra/newview/skins/default/textures/icons/Inv_Link.png
new file mode 100644
index 0000000000..c1543dacb5
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_Link.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 85ccf0f564..c02bf5741e 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -228,39 +228,7 @@ with the same filename but different name
<texture name="Inv_TrashOpen" file_name="icons/Inv_TrashOpen.png" preload="false" />
<texture name="Inv_Underpants" file_name="icons/Inv_Underpants.png" preload="false" />
<texture name="Inv_Undershirt" file_name="icons/Inv_Undershirt.png" preload="false" />
-
- <texture name="Inv_Alpha_Link" file_name="icons/Inv_Alpha_Link.png" preload="false" />
- <texture name="Inv_Animation_Link" file_name="icons/Inv_Animation_Link.png" preload="false" />
- <texture name="Inv_BodyShape_Link" file_name="icons/Inv_BodyShape_Link.png" preload="false" />
- <texture name="Inv_CallingCard_Link" file_name="icons/Inv_CallingCard_Link.png" preload="false" />
- <texture name="Inv_Clothing_Link" file_name="icons/Inv_Clothing_Link.png" preload="false" />
- <texture name="Inv_Eye_Link" file_name="icons/Inv_Eye_Link.png" preload="false" />
- <texture name="Inv_FolderClosed_Link" file_name="icons/Inv_FolderClosed_Link.png" preload="false" />
- <texture name="Inv_FolderOpen_Link" file_name="icons/Inv_FolderOpen_Link.png" preload="false" />
- <texture name="Inv_Gesture_Link" file_name="icons/Inv_Gesture_Link.png" preload="false" />
- <texture name="Inv_Gloves_Link" file_name="icons/Inv_Gloves_Link.png" preload="false" />
- <texture name="Inv_Hair_Link" file_name="icons/Inv_Hair_Link.png" preload="false" />
- <texture name="Inv_LinkFolder_Link" file_name="icons/Inv_LinkFolder_Link.png" preload="false" />
- <texture name="Inv_Jacket_Link" file_name="icons/Inv_Jacket_Link.png" preload="false" />
- <texture name="Inv_LookFolderOpen_Link" file_name="icons/Inv_LookFolderOpen_Link.png" preload="false" />
- <texture name="Inv_LookFolderClosed_Link" file_name="icons/Inv_LookFolderClosed_Link.png" preload="false" />
- <texture name="Inv_Landmark_Link" file_name="icons/Inv_Landmark_Link.png" preload="false" />
- <texture name="Inv_Notecard_Link" file_name="icons/Inv_Notecard_Link.png" preload="false" />
- <texture name="Inv_Object_Link" file_name="icons/Inv_Object_Link.png" preload="false" />
- <texture name="Inv_Object_Multi_Link" file_name="icons/Inv_Object_Multi_Link.png" preload="false" />
- <texture name="Inv_Pants_Link" file_name="icons/Inv_Pants_Link.png" preload="false" />
- <texture name="Inv_Script_Link" file_name="icons/Inv_Script_Link.png" preload="false" />
- <texture name="Inv_Shirt_Link" file_name="icons/Inv_Shirt_Link.png" preload="false" />
- <texture name="Inv_Shoe_Link" file_name="icons/Inv_Shoe_Link.png" preload="false" />
- <texture name="Inv_Skin_Link" file_name="icons/Inv_Skin_Link.png" preload="false" />
- <texture name="Inv_Skirt_Link" file_name="icons/Inv_Skirt_Link.png" preload="false" />
- <texture name="Inv_Snapshot_Link" file_name="icons/Inv_Snapshot_Link.png" preload="false" />
- <texture name="Inv_Socks_Link" file_name="icons/Inv_Socks_Link.png" preload="false" />
- <texture name="Inv_Sound_Link" file_name="icons/Inv_Sound_Link.png" preload="false" />
- <texture name="Inv_Tattoo_Link" file_name="icons/Inv_Tattoo_Link.png" preload="false" />
- <texture name="Inv_Texture_Link" file_name="icons/Inv_Texture_Link.png" preload="false" />
- <texture name="Inv_Underpants_Link" file_name="icons/Inv_Underpants_Link.png" preload="false" />
- <texture name="Inv_Undershirt_Link" file_name="icons/Inv_Undershirt_Link.png" preload="false" />
+ <texture name="Inv_Link" file_name="icons/Inv_Link.png" preload="false" />
<texture name="Linden_Dollar_Alert" file_name="widgets/Linden_Dollar_Alert.png"/>
<texture name="Linden_Dollar_Background" file_name="widgets/Linden_Dollar_Background.png"/>
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index d65b86f007..2a53b3e2fa 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -42,7 +42,7 @@
<filter_editor
text_pad_left="10"
follows="left|top|right"
- height="23"
+ height="23"
label="Filter Inventory"
layout="topleft"
left="10"
@@ -68,10 +68,10 @@
top_pad="10"
width="312">
<inventory_panel
- bg_opaque_color="DkGray2"
- bg_alpha_color="DkGray2"
- background_visible="true"
- background_opaque="true"
+ bg_opaque_color="DkGray2"
+ bg_alpha_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
border="false"
bevel_style="none"
follows="all"
@@ -82,13 +82,14 @@
left="0"
name="All Items"
sort_order_setting="InventorySortOrder"
+ show_item_link_overlays="true"
top="16"
width="288" />
<recent_inventory_panel
- bg_opaque_color="DkGray2"
- bg_alpha_color="DkGray2"
- background_visible="true"
- background_opaque="true"
+ bg_opaque_color="DkGray2"
+ bg_alpha_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
border="false"
bevel_style="none"
follows="all"
@@ -98,6 +99,7 @@
layout="topleft"
left_delta="0"
name="Recent Items"
+ show_item_link_overlays="true"
width="290" />
</tab_container>
<layout_stack