Conflicts:
	indra/newview/llfloateravatarpicker.cpp - Includes to v-d style, since plain alphabetical just won't cut it. Shyotl's changes for name system, here.
	indra/newview/llpanelgroupinvite.cpp - Shyotl's changes for name system, here.

Also corrected new README to have less typos and be slightly more accurate.
This commit is contained in:
Lirusaito
2012-12-10 11:24:25 -05:00
333 changed files with 11005 additions and 6945 deletions

View File

@@ -165,7 +165,7 @@ void LLPanelFriends::updateFriends(U32 changed_mask)
// if the maximum amount of friends are selected
mShowMaxSelectWarning = false;
LLDynamicArray<LLUUID> selected_friends = getSelectedIDs();
const uuid_vec_t selected_friends = mFriendsList->getSelectedIDs();
if(changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE))
{
refreshNames(changed_mask);
@@ -184,13 +184,13 @@ void LLPanelFriends::updateFriends(U32 changed_mask)
tick();
}
}
if(selected_friends.size() > 0)
if(!selected_friends.empty())
{
// only non-null if friends was already found. This may fail,
// but we don't really care here, because refreshUI() will
// clean up the interface.
friends_list->setCurrentByID(selected_id);
for(LLDynamicArray<LLUUID>::iterator itr = selected_friends.begin(); itr != selected_friends.end(); ++itr)
for(uuid_vec_t::const_iterator itr = selected_friends.begin(); itr != selected_friends.end(); ++itr)
{
friends_list->setSelectedByValue(*itr, true);
}
@@ -364,9 +364,9 @@ BOOL LLPanelFriends::postBuild()
{
mFriendsList = getChild<LLScrollListCtrl>("friend_list");
mFriendsList->setCommitOnSelectionChange(TRUE);
childSetCommitCallback("friend_list", onSelectName, this);
mFriendsList->setCommitCallback(onSelectName, this);
childSetCommitCallback("buddy_group_combobox", onChangeContactGroup, this);
childSetDoubleClickCallback("friend_list", onClickIM);
mFriendsList->setDoubleClickCallback(onClickIM, this);
// <dogmode>
// Contact search and group system.
@@ -548,7 +548,7 @@ BOOL LLPanelFriends::updateFriendItem(const LLUUID& agent_id, const LLRelationsh
void LLPanelFriends::refreshRightsChangeList()
{
LLDynamicArray<LLUUID> friends = getSelectedIDs();
const uuid_vec_t friends = mFriendsList->getSelectedIDs();
S32 num_selected = friends.size();
bool can_offer_teleport = num_selected >= 1;
@@ -571,7 +571,7 @@ void LLPanelFriends::refreshRightsChangeList()
processing_label->setVisible(false);
} Making Dummy View -HgB */
const LLRelationship* friend_status = NULL;
for(LLDynamicArray<LLUUID>::iterator itr = friends.begin(); itr != friends.end(); ++itr)
for(uuid_vec_t::const_iterator itr = friends.begin(); itr != friends.end(); ++itr)
{
friend_status = LLAvatarTracker::instance().getBuddyInfo(*itr);
if (friend_status)
@@ -620,7 +620,7 @@ struct SortFriendsByID
void LLPanelFriends::refreshNames(U32 changed_mask)
{
LLDynamicArray<LLUUID> selected_ids = getSelectedIDs();
const uuid_vec_t selected_ids = mFriendsList->getSelectedIDs();
S32 pos = mFriendsList->getScrollPos();
// get all buddies we know about
@@ -646,7 +646,7 @@ void LLPanelFriends::refreshNames(U32 changed_mask)
// Changed item in place, need to request sort and update columns
// because we might have changed data in a column on which the user
// has already sorted. JC
mFriendsList->sortItems();
mFriendsList->updateSort();
// re-select items
mFriendsList->selectMultiple(selected_ids);
@@ -748,18 +748,6 @@ void LLPanelFriends::refreshUI()
refreshRightsChangeList();
}
LLDynamicArray<LLUUID> LLPanelFriends::getSelectedIDs()
{
LLUUID selected_id;
LLDynamicArray<LLUUID> friend_ids;
std::vector<LLScrollListItem*> selected = mFriendsList->getAllSelected();
for(std::vector<LLScrollListItem*>::iterator itr = selected.begin(); itr != selected.end(); ++itr)
{
friend_ids.push_back((*itr)->getUUID());
}
return friend_ids;
}
// static
void LLPanelFriends::onSelectName(LLUICtrl* ctrl, void* user_data)
{
@@ -779,8 +767,8 @@ void LLPanelFriends::onClickProfile(void* user_data)
LLPanelFriends* panelp = (LLPanelFriends*)user_data;
//llinfos << "LLPanelFriends::onClickProfile()" << llendl;
LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
if(ids.size() > 0)
const uuid_vec_t ids = panelp->mFriendsList->getSelectedIDs();
if(!ids.empty())
{
LLUUID agent_id = ids[0];
BOOL online;
@@ -795,7 +783,7 @@ void LLPanelFriends::onClickAssign(void* user_data)
LLPanelFriends* panelp = (LLPanelFriends*)user_data;
if (panelp)
{
LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
const uuid_vec_t ids = panelp->mFriendsList->getSelectedIDs();
ASFloaterContactGroups::show(ids);
}
}
@@ -846,8 +834,8 @@ void LLPanelFriends::onClickIM(void* user_data)
LLPanelFriends* panelp = (LLPanelFriends*)user_data;
//llinfos << "LLPanelFriends::onClickIM()" << llendl;
LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
if(ids.size() > 0)
const uuid_vec_t ids = panelp->mFriendsList->getSelectedIDs();
if(!ids.empty())
{
if(ids.size() == 1)
{
@@ -912,13 +900,12 @@ bool LLPanelFriends::callbackAddFriend(const LLSD& notification, const LLSD& res
}
// static
void LLPanelFriends::onPickAvatar(const std::vector<std::string>& names,
const std::vector<LLUUID>& ids,
void* )
void LLPanelFriends::onPickAvatar( const uuid_vec_t& ids,
const std::vector<LLAvatarName>& names )
{
if (names.empty()) return;
if (ids.empty()) return;
requestFriendshipDialog(ids[0], names[0]);
requestFriendshipDialog(ids[0], names[0].getCompleteName());
}
// static
@@ -954,7 +941,7 @@ void LLPanelFriends::onClickAddFriend(void* user_data)
{
LLPanelFriends* panelp = (LLPanelFriends*)user_data;
LLFloater* root_floater = gFloaterView->getParentFloater(panelp);
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(onPickAvatar, user_data, FALSE, TRUE);
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelFriends::onPickAvatar, _1, _2), FALSE, TRUE);
if (root_floater)
{
root_floater->addDependentFloater(picker);
@@ -967,9 +954,9 @@ void LLPanelFriends::onClickRemove(void* user_data)
LLPanelFriends* panelp = (LLPanelFriends*)user_data;
//llinfos << "LLPanelFriends::onClickRemove()" << llendl;
LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
const uuid_vec_t ids = panelp->mFriendsList->getSelectedIDs();
LLSD args;
if(ids.size() > 0)
if(!ids.empty())
{
std::string msgType = "RemoveFromFriends";
if(ids.size() == 1)
@@ -985,7 +972,7 @@ void LLPanelFriends::onClickRemove(void* user_data)
}
LLSD payload;
for (LLDynamicArray<LLUUID>::iterator it = ids.begin();
for (uuid_vec_t::const_iterator it = ids.begin();
it != ids.end();
++it)
{
@@ -1189,8 +1176,8 @@ void LLPanelFriends::onClickOfferTeleport(void* user_data)
{
LLPanelFriends* panelp = (LLPanelFriends*)user_data;
LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
if(ids.size() > 0)
const uuid_vec_t ids = panelp->mFriendsList->getSelectedIDs();
if(!ids.empty())
{
handle_lure(ids);
}
@@ -1201,8 +1188,8 @@ void LLPanelFriends::onClickPay(void* user_data)
{
LLPanelFriends* panelp = (LLPanelFriends*)user_data;
LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
if(ids.size() == 1)
const uuid_vec_t ids = panelp->mFriendsList->getSelectedIDs();
if(!ids.empty())
{
handle_pay_by_id(ids[0]);
}
@@ -1213,7 +1200,7 @@ void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command
if (ids.empty()) return;
LLSD args;
if(ids.size() > 0)
if(!ids.empty())
{
rights_map_t* rights = new rights_map_t(ids);