diff options
| author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-06-04 14:05:13 -0700 |
|---|---|---|
| committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-06-04 14:05:13 -0700 |
| commit | 6bf2dad1cc8df2769a0833786bc16eea96649d6d (patch) | |
| tree | de2c5b829070ad2f1fbd28d31d6a879e2d81e85c /indra/newview/llpanelpeoplemenus.cpp | |
| parent | ad7dc22ad5d48d703c2cf20fb77ff69dcf3ae820 (diff) | |
ACME-484: Right-click menu only has 'Add Friend' and 'View Profile' options. Also multi-select is disabled.
Diffstat (limited to 'indra/newview/llpanelpeoplemenus.cpp')
| -rwxr-xr-x | indra/newview/llpanelpeoplemenus.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 49f7361c4a..313056f06a 100755 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -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 |
