summaryrefslogtreecommitdiff
path: root/indra/newview/llfavoritesbar.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-10-08 11:59:24 -0700
committerRichard Linden <none@none>2013-10-08 11:59:24 -0700
commit80dfbbaacd82179e54163ed48b1bc444e3becbd5 (patch)
treeda3858b58b5ec9c34d6eefa60c4fe87fc5743249 /indra/newview/llfavoritesbar.cpp
parentf7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff)
parent2eeee8a9491398697a8f3167bc4f715a3970fc3a (diff)
merge from viewer-release
Diffstat (limited to 'indra/newview/llfavoritesbar.cpp')
-rwxr-xr-xindra/newview/llfavoritesbar.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index a2d0759587..1b3cfb5ebd 100755
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -480,7 +480,7 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
const LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
if (item->getParentUUID() == favorites_id)
{
- llwarns << "Attemt to copy a favorite item into the same folder." << llendl;
+ LL_WARNS() << "Attemt to copy a favorite item into the same folder." << LL_ENDL;
break;
}
@@ -632,7 +632,7 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con
// landmarks to an empty favorites bar.
updateButtons();
- llinfos << "Copied inventory item #" << item->getUUID() << " to favorites." << llendl;
+ LL_INFOS() << "Copied inventory item #" << item->getUUID() << " to favorites." << LL_ENDL;
}
//virtual
@@ -738,7 +738,7 @@ void LLFavoritesBarCtrl::updateButtons()
int first_changed_item_index = 0;
int rightest_point = getRect().mRight - mMoreTextBox->getRect().getWidth();
//lets find first changed button
- while (child_it != childs->end() && first_changed_item_index < mItems.count())
+ while (child_it != childs->end() && first_changed_item_index < mItems.size())
{
LLFavoriteLandmarkButton* button = dynamic_cast<LLFavoriteLandmarkButton*> (*child_it);
if (button)
@@ -760,7 +760,7 @@ void LLFavoritesBarCtrl::updateButtons()
}
// now first_changed_item_index should contains a number of button that need to change
- if (first_changed_item_index <= mItems.count())
+ if (first_changed_item_index <= mItems.size())
{
// Rebuild the buttons only
// child_list_t is a linked list, so safe to erase from the middle if we pre-increment the iterator
@@ -798,7 +798,7 @@ void LLFavoritesBarCtrl::updateButtons()
//last_right_edge is saving coordinates
LLButton* last_new_button = NULL;
int j = first_changed_item_index;
- for (; j < mItems.count(); j++)
+ for (; j < mItems.size(); j++)
{
last_new_button = createButton(mItems[j], button_params, last_right_edge);
if (!last_new_button)
@@ -812,7 +812,7 @@ void LLFavoritesBarCtrl::updateButtons()
}
mFirstDropDownItem = j;
// Chevron button
- if (mFirstDropDownItem < mItems.count())
+ if (mFirstDropDownItem < mItems.size())
{
// if updateButton had been called it means:
//or there are some new favorites, or width had been changed
@@ -871,7 +871,7 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem
fav_btn = LLUICtrlFactory::create<LLFavoriteLandmarkButton>(fav_btn_params);
if (NULL == fav_btn)
{
- llwarns << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << llendl;
+ LL_WARNS() << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << LL_ENDL;
return NULL;
}
@@ -977,9 +977,9 @@ void LLFavoritesBarCtrl::updateMenuItems(LLToggleableMenu* menu)
U32 widest_item = 0;
- for (S32 i = mFirstDropDownItem; i < mItems.count(); i++)
+ for (S32 i = mFirstDropDownItem; i < mItems.size(); i++)
{
- LLViewerInventoryItem* item = mItems.get(i);
+ LLViewerInventoryItem* item = mItems.at(i);
const std::string& item_name = item->getName();
LLFavoriteLandmarkMenuItem::Params item_params;
@@ -1160,7 +1160,7 @@ bool LLFavoritesBarCtrl::enableSelected(const LLSD& userdata)
void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
{
std::string action = userdata.asString();
- llinfos << "Action = " << action << " Item = " << mSelectedItemID.asString() << llendl;
+ LL_INFOS() << "Action = " << action << " Item = " << mSelectedItemID.asString() << LL_ENDL;
LLViewerInventoryItem* item = gInventory.getItem(mSelectedItemID);
if (!item)
@@ -1235,12 +1235,12 @@ BOOL LLFavoritesBarCtrl::isClipboardPasteable() const
return FALSE;
}
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- S32 count = objects.count();
+ S32 count = objects.size();
for(S32 i = 0; i < count; i++)
{
- const LLUUID &item_id = objects.get(i);
+ const LLUUID &item_id = objects.at(i);
// Can't paste folders
const LLInventoryCategory *cat = gInventory.getCategory(item_id);
@@ -1264,13 +1264,13 @@ void LLFavoritesBarCtrl::pasteFromClipboard() const
if(model && isClipboardPasteable())
{
LLInventoryItem* item = NULL;
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- S32 count = objects.count();
+ S32 count = objects.size();
LLUUID parent_id(mFavoriteFolderId);
for(S32 i = 0; i < count; i++)
{
- item = model->getItem(objects.get(i));
+ item = model->getItem(objects.at(i));
if (item)
{
copy_inventory_item(
@@ -1487,14 +1487,14 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs()
// Do not change the file if we are not logged in yet.
if (!LLLoginInstance::getInstance()->authSuccess())
{
- llwarns << "Cannot save favorites: not logged in" << llendl;
+ LL_WARNS() << "Cannot save favorites: not logged in" << LL_ENDL;
return;
}
std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "");
if (user_dir.empty())
{
- llwarns << "Cannot save favorites: empty user dir name" << llendl;
+ LL_WARNS() << "Cannot save favorites: empty user dir name" << LL_ENDL;
return;
}
@@ -1522,13 +1522,13 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs()
slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]);
if (slurl_iter != mSLURLs.end())
{
- lldebugs << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << llendl;
+ LL_DEBUGS() << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << LL_ENDL;
value["slurl"] = slurl_iter->second;
user_llsd[LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID())] = value;
}
else
{
- llwarns << "Not saving favorite " << value["name"] << ": no matching SLURL" << llendl;
+ LL_WARNS() << "Not saving favorite " << value["name"] << ": no matching SLURL" << LL_ENDL;
}
}
@@ -1536,7 +1536,7 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs()
LLAvatarNameCache::get( gAgentID, &av_name );
// Note : use the "John Doe" and not the "john.doe" version of the name
// as we'll compare it with the stored credentials in the login panel.
- lldebugs << "Saved favorites for " << av_name.getUserName() << llendl;
+ LL_DEBUGS() << "Saved favorites for " << av_name.getUserName() << LL_ENDL;
fav_llsd[av_name.getUserName()] = user_llsd;
llofstream file;
@@ -1557,7 +1557,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser()
LLAvatarNameCache::get( gAgentID, &av_name );
// Note : use the "John Doe" and not the "john.doe" version of the name.
// See saveFavoritesSLURLs() here above for the reason why.
- lldebugs << "Removed favorites for " << av_name.getUserName() << llendl;
+ LL_DEBUGS() << "Removed favorites for " << av_name.getUserName() << LL_ENDL;
if (fav_llsd.has(av_name.getUserName()))
{
fav_llsd.erase(av_name.getUserName());
@@ -1590,7 +1590,7 @@ void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmar
void LLFavoritesOrderStorage::storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl)
{
- lldebugs << "Saving landmark SLURL: " << slurl << llendl;
+ LL_DEBUGS() << "Saving landmark SLURL: " << slurl << LL_ENDL;
mSLURLs[asset_id] = slurl;
}