summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfoldervieweventlistener.h1
-rw-r--r--indra/newview/llinventorybridge.cpp13
-rw-r--r--indra/newview/llinventorybridge.h1
-rw-r--r--indra/newview/llinventorypanel.cpp28
4 files changed, 30 insertions, 13 deletions
diff --git a/indra/newview/llfoldervieweventlistener.h b/indra/newview/llfoldervieweventlistener.h
index 473d0be912..d6c4459e6f 100644
--- a/indra/newview/llfoldervieweventlistener.h
+++ b/indra/newview/llfoldervieweventlistener.h
@@ -62,6 +62,7 @@ public:
virtual PermissionMask getPermissionMask() const = 0;
virtual LLFolderType::EType getPreferredType() const = 0;
virtual LLPointer<LLUIImage> getIcon() const = 0;
+ virtual LLPointer<LLUIImage> getOpenIcon() const { return getIcon(); }
virtual LLFontGL::StyleFlags getLabelStyle() const = 0;
virtual std::string getLabelSuffix() const = 0;
virtual void openItem( void ) = 0;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index d70221b22a..47d593ca89 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2228,9 +2228,22 @@ LLUIImagePtr LLFolderBridge::getIcon() const
LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type)
{
// we only have one folder image now
+ if (preferred_type == LLFolderType::FT_OUTFIT)
+ {
+ return LLUI::getUIImage("Inv_LookFolderClosed");
+ }
return LLUI::getUIImage("Inv_FolderClosed");
}
+LLUIImagePtr LLFolderBridge::getOpenIcon() const
+{
+ if (getPreferredType() == LLFolderType::FT_OUTFIT)
+ {
+ return LLUI::getUIImage("Inv_LookFolderOpen");
+ }
+ return LLUI::getUIImage("Inv_FolderOpen");
+}
+
BOOL LLFolderBridge::renameItem(const std::string& new_name)
{
if(!isItemRenameable())
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index cc1fa45b26..fced0047e8 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -289,6 +289,7 @@ public:
virtual LLFolderType::EType getPreferredType() const;
virtual LLUIImagePtr getIcon() const;
+ virtual LLUIImagePtr getOpenIcon() const;
static LLUIImagePtr getIcon(LLFolderType::EType preferred_type);
virtual BOOL renameItem(const std::string& new_name);
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 164e72e621..2e5526a273 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -491,13 +491,14 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
if (new_listener)
{
- LLFolderViewFolder::Params p;
- p.name = new_listener->getDisplayName();
- p.icon = new_listener->getIcon();
- p.root = mFolders;
- p.listener = new_listener;
- p.tool_tip = p.name;
- LLFolderViewFolder* folderp = LLUICtrlFactory::create<LLFolderViewFolder>(p);
+ LLFolderViewFolder::Params params;
+ params.name = new_listener->getDisplayName();
+ params.icon = new_listener->getIcon();
+ params.icon_open = new_listener->getOpenIcon();
+ params.root = mFolders;
+ params.listener = new_listener;
+ params.tool_tip = params.name;
+ LLFolderViewFolder* folderp = LLUICtrlFactory::create<LLFolderViewFolder>(params);
folderp->setItemSortOrder(mFolders->getSortOrder());
itemp = folderp;
@@ -523,12 +524,13 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
if (new_listener)
{
LLFolderViewItem::Params params;
- params.name(new_listener->getDisplayName());
- params.icon(new_listener->getIcon());
- params.creation_date(new_listener->getCreationDate());
- params.root(mFolders);
- params.listener(new_listener);
- params.rect(LLRect (0, 0, 0, 0));
+ params.name = new_listener->getDisplayName();
+ params.icon = new_listener->getIcon();
+ params.icon_open = new_listener->getOpenIcon();
+ params.creation_date = new_listener->getCreationDate();
+ params.root = mFolders;
+ params.listener = new_listener;
+ params.rect = LLRect (0, 0, 0, 0);
params.tool_tip = params.name;
itemp = LLUICtrlFactory::create<LLFolderViewItem> (params);
}