diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-04-14 21:04:37 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-04-14 21:04:37 +0300 |
commit | 590890173216570ca834ba1ead66db1a25952247 (patch) | |
tree | dc1dcffffa5eff9faf518194af993a7055428c09 /indra | |
parent | 2412401e4c705c7073be845bba74353d446bd017 (diff) |
CHUI-78 WIP Made the gear buttons spawn the avatar list context menu.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llpanelpeople.h | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_people.xml | 21 |
3 files changed, 24 insertions, 12 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index a9da9e0cbf..6c3f07920b 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -511,6 +511,7 @@ LLPanelPeople::LLPanelPeople() mCommitCallbackRegistrar.add("People.DelFriend", boost::bind(&LLPanelPeople::onDeleteFriendButtonClicked, this)); mCommitCallbackRegistrar.add("People.Group.Minus", boost::bind(&LLPanelPeople::onGroupMinusButtonClicked, this)); mCommitCallbackRegistrar.add("People.Chat", boost::bind(&LLPanelPeople::onChatButtonClicked, this)); + mCommitCallbackRegistrar.add("People.Gear", boost::bind(&LLPanelPeople::onGearButtonClicked, this, _1)); mCommitCallbackRegistrar.add("People.Group.Plus.Action", boost::bind(&LLPanelPeople::onGroupPlusMenuItemClicked, this, _2)); mCommitCallbackRegistrar.add("People.Friends.ViewSort.Action", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemClicked, this, _2)); @@ -806,6 +807,11 @@ void LLPanelPeople::updateButtons() { cur_panel->getChildView("friends_del_btn")->setEnabled(multiple_selected); } + + if (!group_tab_active) + { + cur_panel->getChildView("gear_btn")->setEnabled(multiple_selected); + } } } } @@ -1093,6 +1099,14 @@ void LLPanelPeople::onChatButtonClicked() LLGroupActions::startIM(group_id); } +void LLPanelPeople::onGearButtonClicked(LLUICtrl* btn) +{ + uuid_vec_t selected_uuids; + getCurrentItemIDs(selected_uuids); + // Spawn at bottom left corner of the button. + LLPanelPeopleMenus::gNearbyMenu.show(btn, selected_uuids, 0, 0); +} + void LLPanelPeople::onImButtonClicked() { uuid_vec_t selected_uuids; diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index c99bc532ab..da27f83074 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -90,6 +90,7 @@ private: void onAddFriendWizButtonClicked(); void onDeleteFriendButtonClicked(); void onChatButtonClicked(); + void onGearButtonClicked(LLUICtrl* btn); void onImButtonClicked(); void onMoreButtonClicked(); void onAvatarListDoubleClicked(LLUICtrl* ctrl); diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index ca28e3153c..262c7cbf2c 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -105,7 +105,8 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M text_pad_left="10" top="4" width="178" /> - <menu_button + <button + commit_callback.function="People.Gear" follows="right" height="25" image_hover_unselected="Toolbar_Middle_Over" @@ -114,9 +115,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="7" - menu_filename="menu_people_nearby_gear.xml" - menu_position="bottomleft" - name="nearby_gear_btn" + name="gear_btn" top="3" width="31" /> <menu_button @@ -254,7 +253,8 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M text_pad_left="10" top="4" width="177" /> - <menu_button + <button + commit_callback.function="People.Gear" follows="right" height="25" image_hover_unselected="Toolbar_Middle_Over" @@ -263,9 +263,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="8" - menu_filename="menu_people_friends_gear.xml" - menu_position="bottomleft" - name="friends_gear_btn" + name="gear_btn" top="3" width="31" /> <menu_button @@ -520,7 +518,8 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M text_pad_left="10" top="4" width="177" /> - <menu_button + <button + commit_callback.function="People.Gear" follows="right" height="25" image_hover_unselected="Toolbar_Middle_Over" @@ -529,9 +528,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M image_unselected="Toolbar_Middle_Off" layout="topleft" left_pad="8" - menu_filename="menu_people_recent_gear.xml" - menu_position="bottomleft" - name="recent_gear_btn" + name="gear_btn" top="3" width="31" /> <menu_button |