diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelgroupnotices.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.h | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 6210973dae..45fc3d4688 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -614,7 +614,7 @@ void LLPanelGroupNotices::showNotice(const std::string& subject, mViewInventoryIcon->setVisible(TRUE); std::stringstream ss; - ss << " " << inventory_name; + ss << " " << LLViewerInventoryItem::getDisplayName(inventory_name); mViewInventoryName->setText(ss.str()); mBtnOpenAttachment->setEnabled(TRUE); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 3bed2d36c2..31dc83e75a 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1165,6 +1165,15 @@ const std::string& LLViewerInventoryItem::getDisplayName() const return mDisplayName = hasSortField ? result : LLInventoryItem::getName(); } +// static +std::string LLViewerInventoryItem::getDisplayName(const std::string& name) +{ + std::string result; + BOOL hasSortField = extractSortFieldAndDisplayName(name, 0, &result); + + return hasSortField ? result : name; +} + S32 LLViewerInventoryItem::getSortField() const { S32 result; diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index c4b7fdaa23..917b8747ea 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -66,6 +66,7 @@ public: virtual const LLUUID& getAssetUUID() const; virtual const std::string& getName() const; virtual const std::string& getDisplayName() const; + static std::string getDisplayName(const std::string& name); virtual S32 getSortField() const; virtual void setSortField(S32 sortField); virtual void rename(const std::string& new_name); |