ACME-484: Right-click menu only has 'Add Friend' and 'View Profile' options. Also multi-select is disabled.

meow-7.2.2
Gilbert Gonzales 2013-06-04 14:05:13 -07:00
parent ad7dc22ad5
commit 6bf2dad1cc
4 changed files with 47 additions and 2 deletions

View File

@ -689,7 +689,7 @@ BOOL LLPanelPeople::postBuild()
mRecentList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu);
mAllFriendList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu);
mOnlineFriendList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu);
mSuggestedFriends->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu);
mSuggestedFriends->setContextMenu(&LLPanelPeopleMenus::gSuggestedFriendsContextMenu);
//===Temporary ========================================================================

View File

@ -47,6 +47,7 @@ namespace LLPanelPeopleMenus
PeopleContextMenu gPeopleContextMenu;
NearbyPeopleContextMenu gNearbyPeopleContextMenu;
SuggestedFriendsContextMenu gSuggestedFriendsContextMenu;
//== PeopleContextMenu ===============================================================
@ -301,4 +302,36 @@ void NearbyPeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags)
hide_context_entries(menu, items, disabled_items);
}
//== SuggestedFriendsContextMenu ===============================================================
LLContextMenu* SuggestedFriendsContextMenu::createMenu()
{
// set up the callbacks for all of the avatar menu items
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
LLContextMenu* menu;
// Set up for one person selected menu
const LLUUID& id = mUUIDs.front();
registrar.add("Avatar.Profile", boost::bind(&LLAvatarActions::showProfile, id));
registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, id));
// create the context menu from the XUI
menu = createFromFile("menu_people_nearby.xml");
buildContextMenu(*menu, 0x0);
return menu;
}
void SuggestedFriendsContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags)
{
menuentry_vec_t items;
menuentry_vec_t disabled_items;
items.push_back(std::string("view_profile"));
items.push_back(std::string("add_friend"));
hide_context_entries(menu, items, disabled_items);
}
} // namespace LLPanelPeopleMenus

View File

@ -58,8 +58,21 @@ protected:
/*virtual*/ void buildContextMenu(class LLMenuGL& menu, U32 flags);
};
/**
* Menu used in the suggested friends list.
*/
class SuggestedFriendsContextMenu : public PeopleContextMenu
{
public:
/*virtual*/ LLContextMenu * createMenu();
protected:
/*virtual*/ void buildContextMenu(class LLMenuGL& menu, U32 flags);
};
extern PeopleContextMenu gPeopleContextMenu;
extern NearbyPeopleContextMenu gNearbyPeopleContextMenu;
extern SuggestedFriendsContextMenu gSuggestedFriendsContextMenu;
} // namespace LLPanelPeopleMenus

View File

@ -377,7 +377,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
height="173"
layout="topleft"
left="0"
multi_select="true"
name="suggested_friends"
show_permissions_granted="true"
top="0"