summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-01-29 13:05:11 +0200
committerMike Antipov <mantipov@productengine.com>2010-01-29 13:05:11 +0200
commit8a7ca61479813f55481f1040f75cd6fc63e713d2 (patch)
tree856400d606394a3ac603cd663e9c63ba47ef8321 /indra/newview
parent4666636cdc67beb3cbb1c81107ce1f1f368385e1 (diff)
Work on major bug EXT-3985 ([BSI] Landmarks created in Viewer 2.0 show up with 1@ in Viewer 1.23.x)
-- cleanup: removed deprecated code added for previous sollution to support custom sorting of favorite landmarks. For now previous implementation is removed, bug is FIXED. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfavoritesbar.cpp4
-rw-r--r--indra/newview/llinventorybridge.cpp2
-rw-r--r--indra/newview/llviewerinventory.cpp50
-rw-r--r--indra/newview/llviewerinventory.h4
4 files changed, 13 insertions, 47 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 0e42ff09d8..57e6619470 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -685,7 +685,7 @@ void LLFavoritesBarCtrl::updateButtons()
{
// an child's order and mItems should be same
if (button->getLandmarkId() != item->getUUID() // sort order has been changed
- || button->getLabelSelected() != item->getDisplayName() // favorite's name has been changed
+ || button->getLabelSelected() != item->getName() // favorite's name has been changed
|| button->getRect().mRight < rightest_point) // favbar's width has been changed
{
break;
@@ -780,7 +780,7 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem
* Empty space (or ...) is displaying instead of last symbols, even though the width of the button is enough.
* Problem will gone, if we stretch out the button. For that reason I have to put additional 20 pixels.
*/
- int requred_width = mFont->getWidth(item->getDisplayName()) + 20;
+ int requred_width = mFont->getWidth(item->getName()) + 20;
int width = requred_width > def_button_width? def_button_width : requred_width;
LLFavoriteLandmarkButton* fav_btn = NULL;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 6c9c7d15be..e04d3ec5a0 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -5079,7 +5079,7 @@ void LLLandmarkBridgeAction::doIt()
payload["asset_id"] = item->getAssetUUID();
LLSD args;
- args["LOCATION"] = item->getDisplayName();
+ args["LOCATION"] = item->getName();
LLNotificationsUtil::add("TeleportFromLandmark", args, payload);
}
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index bcfb8ecbbd..3001992630 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1172,7 +1172,7 @@ const std::string& LLViewerInventoryItem::getName() const
return linked_category->getName();
}
- return getDisplayName();
+ return LLInventoryItem::getName();
}
/**
@@ -1340,42 +1340,17 @@ void LLFavoritesOrderStorage::cleanup()
gInventory.collectDescendents(fav_id, cats, items, LLInventoryModel::EXCLUDE_TRASH);
IsNotInFavorites is_not_in_fav(items);
-
- sort_index_map_t aTempMap;
- //copy unremoved values from mSortIndexes to aTempMap
- std::remove_copy_if(mSortIndexes.begin(), mSortIndexes.end(),
- inserter(aTempMap, aTempMap.begin()),
- is_not_in_fav);
-
- //Swap the contents of mSortIndexes and aTempMap
- mSortIndexes.swap(aTempMap);
-}
+ sort_index_map_t aTempMap;
+ //copy unremoved values from mSortIndexes to aTempMap
+ std::remove_copy_if(mSortIndexes.begin(), mSortIndexes.end(),
+ inserter(aTempMap, aTempMap.begin()),
+ is_not_in_fav);
-// *TODO: mantipov: REMOVE, EXT-3985
-const std::string& LLViewerInventoryItem::getDisplayName() const
-{
- return LLInventoryItem::getName();
-/*
- std::string result;
- BOOL hasSortField = extractSortFieldAndDisplayName(0, &result);
-
- mDisplayName = LLInventoryItem::getName();
-
- return mDisplayName = hasSortField ? result : LLInventoryItem::getName();
-*/
+ //Swap the contents of mSortIndexes and aTempMap
+ mSortIndexes.swap(aTempMap);
}
-// *TODO: mantipov: REMOVE, EXT-3985
-// static
-std::string LLViewerInventoryItem::getDisplayName(const std::string& name)
-{
- llassert(false);
- std::string result;
- BOOL hasSortField = extractSortFieldAndDisplayName(name, 0, &result);
-
- return hasSortField ? result : name;
-}
S32 LLViewerInventoryItem::getSortField() const
{
@@ -1387,12 +1362,6 @@ void LLViewerInventoryItem::setSortField(S32 sortField)
LLFavoritesOrderStorage::instance().setSortIndex(mUUID, sortField);
}
-// *TODO: mantipov: REMOVE, EXT-3985
-void LLViewerInventoryItem::rename(const std::string& n)
-{
- LLInventoryItem::rename(n);
-}
-
const LLPermissions& LLViewerInventoryItem::getPermissions() const
{
// Use the actual permissions of the symlink, not its parent.
@@ -1481,7 +1450,8 @@ U32 LLViewerInventoryItem::getCRC32() const
return LLInventoryItem::getCRC32();
}
-// *TODO: mantipov: REMOVE, EXT-3985
+// *TODO: mantipov: should be removed with LMSortPrefix patch in llinventorymodel.cpp, EXT-3985
+static char getSeparator() { return '@'; }
BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName)
{
using std::string;
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index cf104503a8..c24f76c87a 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -64,12 +64,8 @@ public:
virtual LLAssetType::EType getType() const;
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);
- static char getSeparator() { return '@'; }
virtual S32 getSortField() const;
virtual void setSortField(S32 sortField);
- virtual void rename(const std::string& new_name);
virtual const LLPermissions& getPermissions() const;
virtual const LLUUID& getCreatorUUID() const;
virtual const std::string& getDescription() const;