diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-04-05 22:56:18 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-04-05 22:56:18 +0300 |
commit | 2dc032e3e582d39a04c40b7cfb3366424491b491 (patch) | |
tree | 57cf77b61463a74117c4e504eb53529f27ba463d | |
parent | 177c1f80bc132fdad4e46009b074c0609454332f (diff) |
CHUI-78 WIP Added drop-down menus and connected callbacks to the new view/sort/add/remove buttons.
12 files changed, 235 insertions, 220 deletions
diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp index 2f5e29c36e..98f7e0540c 100644 --- a/indra/llui/llmenubutton.cpp +++ b/indra/llui/llmenubutton.cpp @@ -153,6 +153,11 @@ BOOL LLMenuButton::handleMouseDown(S32 x, S32 y, MASK mask) void LLMenuButton::toggleMenu() { + if (mValidateSignal && !(*mValidateSignal)(this, LLSD())) + { + return; + } + if(mMenuHandle.isDead()) return; LLToggleableMenu* menu = dynamic_cast<LLToggleableMenu*>(mMenuHandle.get()); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 9c46f04abf..238834aa92 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -501,17 +501,38 @@ LLPanelPeople::LLPanelPeople() mNearbyList(NULL), mRecentList(NULL), mGroupList(NULL), - mNearbyGearButton(NULL), - mFriendsGearButton(NULL), - mGroupsGearButton(NULL), - mRecentGearButton(NULL), mMiniMap(NULL) { mFriendListUpdater = new LLFriendListUpdater(boost::bind(&LLPanelPeople::updateFriendList, this)); mNearbyListUpdater = new LLNearbyListUpdater(boost::bind(&LLPanelPeople::updateNearbyList, this)); mRecentListUpdater = new LLRecentListUpdater(boost::bind(&LLPanelPeople::updateRecentList, this)); mButtonsUpdater = new LLButtonsUpdater(boost::bind(&LLPanelPeople::updateButtons, this)); - mCommitCallbackRegistrar.add("People.addFriend", boost::bind(&LLPanelPeople::onAddFriendButtonClicked, this)); + + mCommitCallbackRegistrar.add("People.AddFriend", boost::bind(&LLPanelPeople::onAddFriendButtonClicked, this)); + mCommitCallbackRegistrar.add("People.AddFriendWizard", boost::bind(&LLPanelPeople::onAddFriendWizButtonClicked, this)); + mCommitCallbackRegistrar.add("People.DelFriend", boost::bind(&LLPanelPeople::onDeleteFriendButtonClicked, this)); + mCommitCallbackRegistrar.add("People.Group.Activate", boost::bind(&LLPanelPeople::onActivateButtonClicked, this)); + mCommitCallbackRegistrar.add("People.Group.Minus", boost::bind(&LLPanelPeople::onGroupMinusButtonClicked, this)); + mCommitCallbackRegistrar.add("People.ViewProfile", boost::bind(&LLPanelPeople::onViewProfileButtonClicked, this)); + mCommitCallbackRegistrar.add("People.GroupInfo", boost::bind(&LLPanelPeople::onGroupInfoButtonClicked, this)); + mCommitCallbackRegistrar.add("People.Chat", boost::bind(&LLPanelPeople::onChatButtonClicked, this)); + mCommitCallbackRegistrar.add("People.IM", boost::bind(&LLPanelPeople::onImButtonClicked, this)); + mCommitCallbackRegistrar.add("People.Call", boost::bind(&LLPanelPeople::onCallButtonClicked, this)); + mCommitCallbackRegistrar.add("People.GroupCall", boost::bind(&LLPanelPeople::onGroupCallButtonClicked, this)); + mCommitCallbackRegistrar.add("People.Teleport", boost::bind(&LLPanelPeople::onTeleportButtonClicked, this)); + mCommitCallbackRegistrar.add("People.Share", boost::bind(&LLPanelPeople::onShareButtonClicked, this)); + + mCommitCallbackRegistrar.add("People.Group.Plus.Action", boost::bind(&LLPanelPeople::onGroupPlusMenuItemClicked, this, _2)); + mCommitCallbackRegistrar.add("People.Friends.ViewSort.Action", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemClicked, this, _2)); + mCommitCallbackRegistrar.add("People.Nearby.ViewSort.Action", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemClicked, this, _2)); + mCommitCallbackRegistrar.add("People.Groups.ViewSort.Action", boost::bind(&LLPanelPeople::onGroupsViewSortMenuItemClicked, this, _2)); + mCommitCallbackRegistrar.add("People.Recent.ViewSort.Action", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemClicked, this, _2)); + + mEnableCallbackRegistrar.add("People.Friends.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemCheck, this, _2)); + mEnableCallbackRegistrar.add("People.Recent.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemCheck, this, _2)); + mEnableCallbackRegistrar.add("People.Nearby.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemCheck, this, _2)); + + mEnableCallbackRegistrar.add("People.Group.Plus.Validate", boost::bind(&LLPanelPeople::onGroupPlusButtonValidate, this)); } LLPanelPeople::~LLPanelPeople() @@ -525,13 +546,6 @@ LLPanelPeople::~LLPanelPeople() { LLVoiceClient::getInstance()->removeObserver(this); } - - if (mGroupPlusMenuHandle.get()) mGroupPlusMenuHandle.get()->die(); - if (mNearbyViewSortMenuHandle.get()) mNearbyViewSortMenuHandle.get()->die(); - if (mNearbyViewSortMenuHandle.get()) mNearbyViewSortMenuHandle.get()->die(); - if (mGroupsViewSortMenuHandle.get()) mGroupsViewSortMenuHandle.get()->die(); - if (mRecentViewSortMenuHandle.get()) mRecentViewSortMenuHandle.get()->die(); - } void LLPanelPeople::onFriendsAccordionExpandedCollapsed(LLUICtrl* ctrl, const LLSD& param, LLAvatarList* avatar_list) @@ -601,14 +615,6 @@ BOOL LLPanelPeople::postBuild() setSortOrder(mAllFriendList, (ESortOrder)gSavedSettings.getU32("FriendsSortOrder"), false); setSortOrder(mNearbyList, (ESortOrder)gSavedSettings.getU32("NearbyPeopleSortOrder"), false); - LLPanel* groups_panel = getChild<LLPanel>(GROUP_TAB_NAME); - groups_panel->childSetAction("activate_btn", boost::bind(&LLPanelPeople::onActivateButtonClicked, this)); - groups_panel->childSetAction("plus_btn", boost::bind(&LLPanelPeople::onGroupPlusButtonClicked, this)); - - LLPanel* friends_panel = getChild<LLPanel>(FRIENDS_TAB_NAME); - friends_panel->childSetAction("add_btn", boost::bind(&LLPanelPeople::onAddFriendWizButtonClicked, this)); - friends_panel->childSetAction("del_btn", boost::bind(&LLPanelPeople::onDeleteFriendButtonClicked, this)); - mOnlineFriendList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1)); mAllFriendList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1)); mNearbyList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1)); @@ -637,70 +643,9 @@ BOOL LLPanelPeople::postBuild() accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLPanelPeople::onFriendsAccordionExpandedCollapsed, this, _1, _2, mOnlineFriendList)); - buttonSetAction("view_profile_btn", boost::bind(&LLPanelPeople::onViewProfileButtonClicked, this)); - buttonSetAction("group_info_btn", boost::bind(&LLPanelPeople::onGroupInfoButtonClicked, this)); - buttonSetAction("chat_btn", boost::bind(&LLPanelPeople::onChatButtonClicked, this)); - buttonSetAction("im_btn", boost::bind(&LLPanelPeople::onImButtonClicked, this)); - buttonSetAction("call_btn", boost::bind(&LLPanelPeople::onCallButtonClicked, this)); - buttonSetAction("group_call_btn", boost::bind(&LLPanelPeople::onGroupCallButtonClicked, this)); - buttonSetAction("teleport_btn", boost::bind(&LLPanelPeople::onTeleportButtonClicked, this)); - buttonSetAction("share_btn", boost::bind(&LLPanelPeople::onShareButtonClicked, this)); - // Must go after setting commit callback and initializing all pointers to children. mTabContainer->selectTabByName(NEARBY_TAB_NAME); - // Create menus. - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; - - registrar.add("People.Group.Plus.Action", boost::bind(&LLPanelPeople::onGroupPlusMenuItemClicked, this, _2)); - registrar.add("People.Group.Minus.Action", boost::bind(&LLPanelPeople::onGroupMinusButtonClicked, this)); - registrar.add("People.Friends.ViewSort.Action", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemClicked, this, _2)); - registrar.add("People.Nearby.ViewSort.Action", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemClicked, this, _2)); - registrar.add("People.Groups.ViewSort.Action", boost::bind(&LLPanelPeople::onGroupsViewSortMenuItemClicked, this, _2)); - registrar.add("People.Recent.ViewSort.Action", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemClicked, this, _2)); - - enable_registrar.add("People.Group.Minus.Enable", boost::bind(&LLPanelPeople::isRealGroup, this)); - enable_registrar.add("People.Friends.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemCheck, this, _2)); - enable_registrar.add("People.Recent.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemCheck, this, _2)); - enable_registrar.add("People.Nearby.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemCheck, this, _2)); - - mNearbyGearButton = getChild<LLMenuButton>("nearby_view_sort_btn"); - mFriendsGearButton = getChild<LLMenuButton>("friends_viewsort_btn"); - mGroupsGearButton = getChild<LLMenuButton>("groups_viewsort_btn"); - mRecentGearButton = getChild<LLMenuButton>("recent_viewsort_btn"); - - LLMenuGL* plus_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_group_plus.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - mGroupPlusMenuHandle = plus_menu->getHandle(); - - LLToggleableMenu* nearby_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_people_nearby_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - if(nearby_view_sort) - { - mNearbyViewSortMenuHandle = nearby_view_sort->getHandle(); - mNearbyGearButton->setMenu(nearby_view_sort); - } - - LLToggleableMenu* friend_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_people_friends_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - if(friend_view_sort) - { - mFriendsViewSortMenuHandle = friend_view_sort->getHandle(); - mFriendsGearButton->setMenu(friend_view_sort); - } - - LLToggleableMenu* group_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_people_groups_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - if(group_view_sort) - { - mGroupsViewSortMenuHandle = group_view_sort->getHandle(); - mGroupsGearButton->setMenu(group_view_sort); - } - - LLToggleableMenu* recent_view_sort = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_people_recent_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - if(recent_view_sort) - { - mRecentViewSortMenuHandle = recent_view_sort->getHandle(); - mRecentGearButton->setMenu(recent_view_sort); - } - LLVoiceClient::getInstance()->addObserver(this); // call this method in case some list is empty and buttons can be in inconsistent state @@ -835,13 +780,6 @@ void LLPanelPeople::buttonSetEnabled(const std::string& btn_name, bool enabled) button->setEnabled(enabled); } -void LLPanelPeople::buttonSetAction(const std::string& btn_name, const commit_signal_t::slot_type& cb) -{ - // To make sure we're referencing the right widget (a child of the button bar). - LLButton* button = getChild<LLView>("button_bar")->getChild<LLButton>(btn_name); - button->setClickedCallback(cb); -} - void LLPanelPeople::updateButtons() { std::string cur_tab = getActiveTabName(); @@ -877,7 +815,7 @@ void LLPanelPeople::updateButtons() LLPanel* groups_panel = mTabContainer->getCurrentPanel(); groups_panel->getChildView("activate_btn")->setEnabled(item_selected && !cur_group_active); // "none" or a non-active group selected - groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); + groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected } else { @@ -893,10 +831,12 @@ void LLPanelPeople::updateButtons() LLPanel* cur_panel = mTabContainer->getCurrentPanel(); if (cur_panel) { - cur_panel->getChildView("add_friend_btn")->setEnabled(!is_friend); + if (cur_panel->hasChild("add_friend_btn", TRUE)) + cur_panel->getChildView("add_friend_btn")->setEnabled(item_selected && !is_friend); + if (friends_tab_active) { - cur_panel->getChildView("del_btn")->setEnabled(multiple_selected); + cur_panel->getChildView("friends_del_btn")->setEnabled(multiple_selected); } } } @@ -1031,11 +971,6 @@ void LLPanelPeople::setSortOrder(LLAvatarList* list, ESortOrder order, bool save } } -bool LLPanelPeople::isRealGroup() -{ - return getCurrentItemID() != LLUUID::null; -} - void LLPanelPeople::onFilterEdit(const std::string& search_string) { mFilterSubStringOrig = search_string; @@ -1226,19 +1161,15 @@ void LLPanelPeople::onAvatarPicked(const uuid_vec_t& ids, const std::vector<LLAv LLAvatarActions::requestFriendshipDialog(ids[0], names[0].getCompleteName()); } -void LLPanelPeople::onGroupPlusButtonClicked() +bool LLPanelPeople::onGroupPlusButtonValidate() { if (!gAgent.canJoinGroups()) { LLNotificationsUtil::add("JoinedTooManyGroups"); - return; + return false; } - LLMenuGL* plus_menu = (LLMenuGL*)mGroupPlusMenuHandle.get(); - if (!plus_menu) - return; - - showGroupMenu(plus_menu); + return true; } void LLPanelPeople::onGroupMinusButtonClicked() diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 46c58cd139..684dcdeb6d 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -82,7 +82,6 @@ private: void getCurrentItemIDs(uuid_vec_t& selected_uuids) const; void buttonSetVisible(std::string btn_name, BOOL visible); void buttonSetEnabled(const std::string& btn_name, bool enabled); - void buttonSetAction(const std::string& btn_name, const commit_signal_t::slot_type& cb); void showGroupMenu(LLMenuGL* menu); void setSortOrder(LLAvatarList* list, ESortOrder order, bool save = true); @@ -104,7 +103,7 @@ private: void onActivateButtonClicked(); void onAvatarListDoubleClicked(LLUICtrl* ctrl); void onAvatarListCommitted(LLAvatarList* list); - void onGroupPlusButtonClicked(); + bool onGroupPlusButtonValidate(); void onGroupMinusButtonClicked(); void onGroupPlusMenuItemClicked(const LLSD& userdata); @@ -113,8 +112,6 @@ private: void onGroupsViewSortMenuItemClicked(const LLSD& userdata); void onRecentViewSortMenuItemClicked(const LLSD& userdata); - //returns false only if group is "none" - bool isRealGroup(); bool onFriendsViewSortMenuItemCheck(const LLSD& userdata); bool onRecentViewSortMenuItemCheck(const LLSD& userdata); bool onNearbyViewSortMenuItemCheck(const LLSD& userdata); @@ -144,22 +141,11 @@ private: LLGroupList* mGroupList; LLNetMap* mMiniMap; - LLHandle<LLView> mGroupPlusMenuHandle; - LLHandle<LLView> mNearbyViewSortMenuHandle; - LLHandle<LLView> mFriendsViewSortMenuHandle; - LLHandle<LLView> mGroupsViewSortMenuHandle; - LLHandle<LLView> mRecentViewSortMenuHandle; - Updater* mFriendListUpdater; Updater* mNearbyListUpdater; Updater* mRecentListUpdater; Updater* mButtonsUpdater; - LLMenuButton* mNearbyGearButton; - LLMenuButton* mFriendsGearButton; - LLMenuButton* mGroupsGearButton; - LLMenuButton* mRecentGearButton; - std::string mFilterSubString; std::string mFilterSubStringOrig; }; diff --git a/indra/newview/skins/default/xui/en/menu_group_plus.xml b/indra/newview/skins/default/xui/en/menu_group_plus.xml index fce7414d80..eca9e7f3c9 100644 --- a/indra/newview/skins/default/xui/en/menu_group_plus.xml +++ b/indra/newview/skins/default/xui/en/menu_group_plus.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<menu name="menu_group_plus" +<toggleable_menu name="menu_group_plus" left="0" bottom="0" visible="false" mouse_opaque="false"> <menu_item_call name="item_join" label="Join Group..."> @@ -8,4 +8,4 @@ <menu_item_call name="item_new" label="New Group..."> <menu_item_call.on_click function="People.Group.Plus.Action" userdata="new_group" /> </menu_item_call> -</menu> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_sort.xml b/indra/newview/skins/default/xui/en/menu_people_friends_sort.xml new file mode 100644 index 0000000000..532e295386 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_people_friends_sort.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + name="menu_group_plus" + left="0" bottom="0" visible="false" + mouse_opaque="false"> + <menu_item_check + label="Sort by Name" + name="sort_name"> + <menu_item_check.on_click + function="People.Friends.ViewSort.Action" + parameter="sort_name" /> + <menu_item_check.on_check + function="People.Friends.ViewSort.CheckItem" + parameter="sort_name" /> + </menu_item_check> + <menu_item_check + label="Sort by Status" + name="sort_status"> + <menu_item_check.on_click + function="People.Friends.ViewSort.Action" + parameter="sort_status" /> + <menu_item_check.on_check + function="People.Friends.ViewSort.CheckItem" + parameter="sort_status" /> + </menu_item_check> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml index b452f96e7a..be23e91587 100644 --- a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml @@ -3,27 +3,6 @@ name="menu_group_plus" left="0" bottom="0" visible="false" mouse_opaque="false"> - <menu_item_check - label="Sort by Name" - name="sort_name"> - <menu_item_check.on_click - function="People.Friends.ViewSort.Action" - parameter="sort_name" /> - <menu_item_check.on_check - function="People.Friends.ViewSort.CheckItem" - parameter="sort_name" /> - </menu_item_check> - <menu_item_check - label="Sort by Status" - name="sort_status"> - <menu_item_check.on_click - function="People.Friends.ViewSort.Action" - parameter="sort_status" /> - <menu_item_check.on_check - function="People.Friends.ViewSort.CheckItem" - parameter="sort_status" /> - </menu_item_check> - <menu_item_separator layout="topleft" /> <menu_item_check name="view_icons" label="View People Icons"> <menu_item_check.on_click function="People.Friends.ViewSort.Action" diff --git a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_groups_view.xml index c710fe3b9b..73f79f1e70 100644 --- a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_groups_view.xml @@ -14,13 +14,4 @@ function="CheckControl" parameter="GroupListShowIcons" /> </menu_item_check> - <menu_item_call - label="Leave Selected Group" - layout="topleft" - name="Leave Selected Group"> - <menu_item_call.on_click - function="People.Group.Minus.Action"/> - <menu_item_call.on_enable - function="People.Group.Minus.Enable"/> - </menu_item_call> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_sort.xml index 614dd693c5..cf7f4f4fce 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby_sort.xml @@ -33,25 +33,4 @@ function="People.Nearby.ViewSort.CheckItem" parameter="sort_distance"/> </menu_item_check> - <menu_item_separator layout="topleft" /> - <menu_item_check name="view_icons" label="View People Icons"> - <menu_item_check.on_click - function="People.Nearby.ViewSort.Action" - parameter="view_icons" /> - <menu_item_check.on_check - function="CheckControl" - parameter="NearbyListShowIcons" /> - </menu_item_check> - <menu_item_check name ="view_map" label="View Map"> - <menu_item_check.on_check - function="CheckControl" - parameter="NearbyListShowMap" /> - <menu_item_check.on_click - function="ToggleControl" - parameter="NearbyListShowMap" /> - </menu_item_check> - <menu_item_separator layout="topleft" /> - <menu_item_call name="show_blocked_list" label="Show Blocked Residents & Objects"> - <menu_item_call.on_click function="People.Nearby.ViewSort.Action" userdata="panel_block_list_sidetray" /> - </menu_item_call> -</toggleable_menu> + </toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_view.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_view.xml new file mode 100644 index 0000000000..187dd3bcb5 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_people_nearby_view.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + name="menu_group_plus" + left="0" bottom="0" visible="false" + mouse_opaque="false"> + <menu_item_check name="view_icons" label="View People Icons"> + <menu_item_check.on_click + function="People.Nearby.ViewSort.Action" + parameter="view_icons" /> + <menu_item_check.on_check + function="CheckControl" + parameter="NearbyListShowIcons" /> + </menu_item_check> + <menu_item_check name ="view_map" label="View Map"> + <menu_item_check.on_check + function="CheckControl" + parameter="NearbyListShowMap" /> + <menu_item_check.on_click + function="ToggleControl" + parameter="NearbyListShowMap" /> + </menu_item_check> + <menu_item_separator + layout="topleft" /> + <menu_item_call + name="show_blocked_list" + label="Show Blocked Residents & Objects"> + <menu_item_call.on_click + function="People.Nearby.ViewSort.Action" + userdata="panel_block_list_sidetray" /> + </menu_item_call> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_recent_sort.xml index 485a5a658c..f14be88780 100644 --- a/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_recent_sort.xml @@ -23,17 +23,4 @@ function="People.Recent.ViewSort.CheckItem" parameter="sort_name" /> </menu_item_check> - <menu_item_separator layout="topleft" /> - <menu_item_check name="view_icons" label="View People Icons"> - <menu_item_check.on_click - function="People.Recent.ViewSort.Action" - parameter="view_icons" /> - <menu_item_check.on_check - function="CheckControl" - parameter="RecentListShowIcons" /> - </menu_item_check> - <menu_item_separator layout="topleft" /> - <menu_item_call name="show_blocked_list" label="Show Blocked Residents & Objects"> - <menu_item_call.on_click function="People.Recent.ViewSort.Action" userdata="panel_block_list_sidetray" /> - </menu_item_call> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_recent_view.xml b/indra/newview/skins/default/xui/en/menu_people_recent_view.xml new file mode 100644 index 0000000000..5520bc993c --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_people_recent_view.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + name="menu_group_plus" + left="0" bottom="0" visible="false" + mouse_opaque="false"> + <menu_item_check name="view_icons" label="View People Icons"> + <menu_item_check.on_click + function="People.Recent.ViewSort.Action" + parameter="view_icons" /> + <menu_item_check.on_check + function="CheckControl" + parameter="RecentListShowIcons" /> + </menu_item_check> + <menu_item_separator layout="topleft" /> + <menu_item_call name="show_blocked_list" label="Show Blocked Residents & Objects"> + <menu_item_call.on_click function="People.Recent.ViewSort.Action" userdata="panel_block_list_sidetray" /> + </menu_item_call> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 919661eff6..f61b0b3dbd 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -73,6 +73,9 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M top="0" halign="center" width="319"> + +<!-- ================================= NEARBY tab =========================== --> + <panel background_opaque="true" background_visible="true" @@ -117,19 +120,23 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="10" - name="nearby_sort_btn" + menu_filename="menu_people_nearby_view.xml" + menu_position="bottomleft" + name="nearby_view_btn" top="1" width="31" /> <menu_button follows="right" height="25" image_hover_unselected="Toolbar_Middle_Over" - image_overlay="Hierarchy_View_Disabled" + image_overlay="Inv_Underpants" image_selected="Toolbar_Middle_Selected" image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="2" - name="nearby_view_btn" + menu_filename="menu_people_nearby_sort.xml" + menu_position="bottomleft" + name="nearby_sort_btn" top="1" width="31" /> <button @@ -141,10 +148,14 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="2" - name="nearby_add_btn" + name="add_friend_btn" top="1" - width="31" /> + width="31"> + <commit_callback + function="People.AddFriend" /> + </button> <dnd_button + enabled="false" follows="right" height="25" image_hover_unselected="Toolbar_Middle_Over" @@ -155,7 +166,10 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M layout="topleft" name="nearby_del_btn" top="1" - width="31"/> + width="31"> + <commit_callback + function="People.DelFriend" /> + </dnd_button> </panel> <layout_stack clip="false" @@ -208,6 +222,9 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M </layout_panel> </layout_stack> </panel> + +<!-- ================================= FRIENDS tab ========================== --> + <panel background_opaque="true" background_visible="true" @@ -252,19 +269,23 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="10" - name="friends_sort_btn" + menu_filename="menu_people_friends_view.xml" + menu_position="bottomleft" + name="friends_view_btn" top="1" width="31" /> <menu_button follows="right" height="25" image_hover_unselected="Toolbar_Middle_Over" - image_overlay="Hierarchy_View_Disabled" + image_overlay="Inv_Underpants" image_selected="Toolbar_Middle_Selected" image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="2" - name="friends_view_btn" + menu_filename="menu_people_friends_sort.xml" + menu_position="bottomleft" + name="friends_sort_btn" top="1" width="31" /> <button @@ -278,7 +299,10 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M left_pad="2" name="friends_add_btn" top="1" - width="31" /> + width="31"> + <commit_callback + function="People.AddFriendWizard" /> + </button> <dnd_button follows="right" height="25" @@ -290,7 +314,10 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M layout="topleft" name="friends_del_btn" top="1" - width="31"/> + width="31"> + <commit_callback + function="People.DelFriend" /> + </dnd_button> </panel> <accordion background_visible="true" @@ -348,6 +375,9 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M width="293" wrap="true" /> </panel> + +<!-- ================================= GROUPS tab =========================== --> + <panel background_opaque="true" background_visible="true" @@ -396,19 +426,22 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="10" - name="groups_sort_btn" + menu_filename="menu_people_groups_view.xml" + menu_position="bottomleft" + name="groups_view_btn" top="1" width="31" /> <menu_button + enabled="false" follows="right" height="25" image_hover_unselected="Toolbar_Middle_Over" - image_overlay="Hierarchy_View_Disabled" + image_overlay="Inv_Underpants" image_selected="Toolbar_Middle_Selected" image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="2" - name="groups_view_btn" + name="groups_sort_btn" top="1" width="31" /> <button @@ -420,10 +453,13 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="2" - name="groups_activate_btn" + name="activate_btn" top="1" - width="31" /> - <button + width="31"> + <commit_callback + function="People.Group.Activate" /> + </button> + <menu_button follows="right" height="25" image_hover_unselected="Toolbar_Middle_Over" @@ -432,9 +468,14 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="2" - name="groups_add_btn" + menu_filename="menu_group_plus.xml" + menu_position="bottomleft" + name="minus_btn" top="1" - width="31" /> + width="31"> + <validate_callback + function="People.Group.Plus.Validate" /> + </menu_button> <dnd_button follows="right" height="25" @@ -444,9 +485,12 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M image_unselected="Toolbar_Middle_Off" left_pad="2" layout="topleft" - name="groups_del_btn" + name="minus_btn" top="1" - width="31"/> + width="31"> + <commit_callback + function="People.Group.Minus" /> + </dnd_button> </panel> <group_list allow_select="true" @@ -458,6 +502,9 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M top_pad="0" width="307" /> </panel> + +<!-- ================================= RECENT tab =========================== --> + <panel background_opaque="true" background_visible="true" @@ -502,19 +549,23 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="10" - name="recent_sort_btn" + menu_filename="menu_people_recent_view.xml" + menu_position="bottomleft" + name="recent_view_btn" top="1" width="31" /> <menu_button follows="right" height="25" image_hover_unselected="Toolbar_Middle_Over" - image_overlay="Hierarchy_View_Disabled" + image_overlay="Inv_Underpants" image_selected="Toolbar_Middle_Selected" image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="2" - name="recent_view_btn" + menu_filename="menu_people_recent_sort.xml" + menu_position="bottomleft" + name="recent_sort_btn" top="1" width="31" /> <button @@ -526,10 +577,14 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="2" - name="recent_add_btn" + name="add_friend_btn" top="1" - width="31" /> + width="31"> + <commit_callback + function="People.AddFriend" /> + </button> <dnd_button + enabled="false" follows="right" height="25" image_hover_unselected="Toolbar_Middle_Over" @@ -540,7 +595,10 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M layout="topleft" name="recent_del_btn" top="1" - width="31"/> + width="31"> + <commit_callback + function="People.DelFriend" /> + </dnd_button> </panel> <avatar_list allow_select="true" @@ -592,7 +650,10 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M name="view_profile_btn" tool_tip="Show picture, groups, and other Residents information" top="0" - width="67" /> + width="67"> + <commit_callback + function="People.ViewProfile" /> + </button> </layout_panel> <layout_panel @@ -612,7 +673,10 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M name="im_btn" tool_tip="Open instant message session" top="0" - width="40" /> + width="40"> + <commit_callback + function="People.IM" /> + </button> </layout_panel> <layout_panel @@ -632,7 +696,10 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M name="call_btn" tool_tip="Call this Resident" top="0" - width="51" /> + width="51"> + <commit_callback + function="People.Call" /> + </button> </layout_panel> <layout_panel @@ -652,7 +719,10 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M name="share_btn" tool_tip="Share an inventory item" top="0" - width="65" /> + width="65"> + <commit_callback + function="People.Share" /> + </button> </layout_panel> <layout_panel @@ -672,7 +742,10 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M name="teleport_btn" tool_tip="Offer teleport" top="0" - width="76" /> + width="76"> + <commit_callback + function="People.Teleport" /> + </button> </layout_panel> </layout_stack> @@ -706,7 +779,10 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M name="group_info_btn" tool_tip="Show group information" top="0" - width="107" /> + width="107"> + <commit_callback + function="People.GroupInfo" /> + </button> </layout_panel> <layout_panel @@ -728,7 +804,10 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M name="chat_btn" tool_tip="Open chat session" top="0" - width="100" /> + width="100"> + <commit_callback + function="People.Chat" /> + </button> </layout_panel> <layout_panel @@ -750,7 +829,10 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M name="group_call_btn" tool_tip="Call this group" top="0" - width="95" /> + width="95"> + <commit_callback + function="People.GroupCall" /> + </button> </layout_panel> </layout_stack> </panel> |