Update for low bug EXT-4306 - Landmark name is shown with prefix in the group notice attachment.
--HG-- branch : product-enginemeow-7.2.2
parent
a5bb9a722d
commit
cd790bfd54
|
|
@ -58,7 +58,6 @@ public:
|
|||
protected:
|
||||
~LLViewerInventoryItem( void ); // ref counted
|
||||
BOOL extractSortFieldAndDisplayName(S32* sortField, std::string* displayName) const { return extractSortFieldAndDisplayName(mName, sortField, displayName); }
|
||||
static char getSeparator() { return '@'; }
|
||||
mutable std::string mDisplayName;
|
||||
|
||||
public:
|
||||
|
|
@ -67,6 +66,7 @@ public:
|
|||
virtual const std::string& getName() const;
|
||||
virtual const std::string& getDisplayName() const;
|
||||
static std::string getDisplayName(const std::string& name);
|
||||
static char getSeparator() { return '@'; }
|
||||
virtual S32 getSortField() const;
|
||||
virtual void setSortField(S32 sortField);
|
||||
virtual void rename(const std::string& new_name);
|
||||
|
|
|
|||
|
|
@ -1436,6 +1436,31 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
|
|||
return false;
|
||||
}
|
||||
|
||||
std::string get_display_name(const std::string& name)
|
||||
{
|
||||
// We receive landmark name as \'<n>@name\' where <n> is a number
|
||||
// LLViewerInventoryItem::getDisplayName will remove \'<n>@ though we need the \'
|
||||
// Lets save all chars preceding @ and insert them back after <n>@ was removed
|
||||
|
||||
std::string saved;
|
||||
|
||||
if(std::string::npos != name.find(LLViewerInventoryItem::getSeparator()))
|
||||
{
|
||||
int n = 0;
|
||||
while(!isdigit(name[n]) && LLViewerInventoryItem::getSeparator() != name[n])
|
||||
{
|
||||
++n;
|
||||
}
|
||||
saved = name.substr(0, n);
|
||||
}
|
||||
|
||||
std::string d_name = LLViewerInventoryItem::getDisplayName(name);
|
||||
d_name.insert(0, saved);
|
||||
LLStringUtil::trim(d_name);
|
||||
|
||||
return d_name;
|
||||
}
|
||||
|
||||
void inventory_offer_handler(LLOfferInfo* info)
|
||||
{
|
||||
//Until throttling is implmented, busy mode should reject inventory instead of silently
|
||||
|
|
@ -1475,7 +1500,7 @@ void inventory_offer_handler(LLOfferInfo* info)
|
|||
|
||||
if(LLAssetType::AT_LANDMARK == info->mType)
|
||||
{
|
||||
msg = LLViewerInventoryItem::getDisplayName(msg);
|
||||
msg = get_display_name(msg);
|
||||
}
|
||||
|
||||
LLSD args;
|
||||
|
|
|
|||
Loading…
Reference in New Issue