Don't disable friend right checkboxes forever, thank you~
Clean up old/dead code there, too.
This commit is contained in:
@@ -459,11 +459,6 @@ void LLPanelFriends::updateFriendItem(const LLUUID& agent_id, const LLRelationsh
|
||||
itemp->getColumn(LIST_VISIBLE_MAP_THEIRS)->setValue(info->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION));
|
||||
itemp->getColumn(LIST_EDIT_THEIRS)->setValue(info->isRightGrantedFrom(LLRelationship::GRANT_MODIFY_OBJECTS));
|
||||
|
||||
// enable this item, in case it was disabled after user input
|
||||
itemp->getColumn(LIST_VISIBLE_ONLINE)->setEnabled(true);
|
||||
itemp->getColumn(LIST_VISIBLE_MAP)->setEnabled(true);
|
||||
itemp->getColumn(LIST_EDIT_MINE)->setEnabled(true);
|
||||
|
||||
mFriendsList->setNeedsSort();
|
||||
|
||||
// Do not resort, this function can be called frequently.
|
||||
@@ -471,30 +466,7 @@ void LLPanelFriends::updateFriendItem(const LLUUID& agent_id, const LLRelationsh
|
||||
|
||||
void LLPanelFriends::refreshRightsChangeList()
|
||||
{
|
||||
const uuid_vec_t friends = mFriendsList->getSelectedIDs();
|
||||
|
||||
size_t num_selected = friends.size();
|
||||
bool can_offer_teleport = num_selected;
|
||||
|
||||
/* if (LLTextBox* processing_label = getChild<LLTextBox>("process_rights_label"))
|
||||
{
|
||||
processing_label->setVisible(true);
|
||||
// ignore selection for now
|
||||
friends.clear();
|
||||
num_selected = 0;
|
||||
} Making Dummy View -HgB */
|
||||
for(uuid_vec_t::const_iterator itr = friends.begin(); itr != friends.end(); ++itr)
|
||||
{
|
||||
if (const LLRelationship* friend_status = LLAvatarTracker::instance().getBuddyInfo(*itr))
|
||||
{
|
||||
if (!friend_status->isOnline())
|
||||
can_offer_teleport = false;
|
||||
}
|
||||
else // missing buddy info, don't allow any operations
|
||||
{
|
||||
can_offer_teleport = false;
|
||||
}
|
||||
}
|
||||
S32 num_selected = mFriendsList->getNumSelected();
|
||||
|
||||
//Stuff for the online/total/select counts.
|
||||
getChild<LLTextBox>("s_num")->setValue(llformat("%d", num_selected));
|
||||
@@ -510,7 +482,7 @@ void LLPanelFriends::refreshRightsChangeList()
|
||||
{
|
||||
getChildView("im_btn")->setEnabled(true);
|
||||
//getChildView("assign_btn")->setEnabled(num_selected == 1);
|
||||
getChildView("offer_teleport_btn")->setEnabled(can_offer_teleport);
|
||||
getChildView("offer_teleport_btn")->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -958,15 +930,7 @@ void LLPanelFriends::applyRightsToFriends()
|
||||
}
|
||||
|
||||
if (rights_changed)
|
||||
{
|
||||
rights_updates.insert(std::make_pair(id, rights));
|
||||
// disable these ui elements until response from server
|
||||
// to avoid race conditions
|
||||
LLScrollListItem& item = *(*itr);
|
||||
item.getColumn(LIST_VISIBLE_ONLINE)->setEnabled(false);
|
||||
item.getColumn(LIST_VISIBLE_MAP)->setEnabled(false);
|
||||
item.getColumn(LIST_EDIT_MINE)->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
// separately confirm grant and revoke of modify rights
|
||||
|
||||
Reference in New Issue
Block a user