diff options
author | Eugene Mutavchi <emutavchi@productengine.com> | 2009-11-16 18:30:33 +0200 |
---|---|---|
committer | Eugene Mutavchi <emutavchi@productengine.com> | 2009-11-16 18:30:33 +0200 |
commit | 914e76fe41ba14b6c51c5e25164086ab8ce84921 (patch) | |
tree | 68920f14b0e9090e4cd05fb0d46d47aeceb8955d /indra | |
parent | 32d8e9e396d497a83eb068888d794dd34216f6d7 (diff) |
Fixed low bug EXT-2324 ('+' btn do nothing in Recent and Nearby tabs on People panel when focus is set to non-friend avatar)
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 9 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_people.xml | 10 |
2 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 1f5ffb7335..709525d4e2 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -448,6 +448,7 @@ LLPanelPeople::LLPanelPeople() mFriendListUpdater = new LLFriendListUpdater(boost::bind(&LLPanelPeople::updateFriendList, this)); mNearbyListUpdater = new LLNearbyListUpdater(boost::bind(&LLPanelPeople::updateNearbyList, this)); mRecentListUpdater = new LLRecentListUpdater(boost::bind(&LLPanelPeople::updateRecentList, this)); + mCommitCallbackRegistrar.add("People.addFriend", boost::bind(&LLPanelPeople::onAddFriendButtonClicked, this)); } LLPanelPeople::~LLPanelPeople() @@ -547,7 +548,6 @@ BOOL LLPanelPeople::postBuild() boost::bind(&LLPanelPeople::onFriendsAccordionExpandedCollapsed, this, _2, mOnlineFriendList)); buttonSetAction("view_profile_btn", boost::bind(&LLPanelPeople::onViewProfileButtonClicked, this)); - buttonSetAction("add_friend_btn", boost::bind(&LLPanelPeople::onAddFriendButtonClicked, 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)); @@ -707,7 +707,7 @@ void LLPanelPeople::updateButtons() bool nearby_tab_active = (cur_tab == NEARBY_TAB_NAME); bool friends_tab_active = (cur_tab == FRIENDS_TAB_NAME); bool group_tab_active = (cur_tab == GROUP_TAB_NAME); - bool recent_tab_active = (cur_tab == RECENT_TAB_NAME); + //bool recent_tab_active = (cur_tab == RECENT_TAB_NAME); LLUUID selected_id; std::vector<LLUUID> selected_uuids; @@ -717,7 +717,6 @@ void LLPanelPeople::updateButtons() buttonSetVisible("group_info_btn", group_tab_active); buttonSetVisible("chat_btn", group_tab_active); - buttonSetVisible("add_friend_btn", nearby_tab_active || recent_tab_active); buttonSetVisible("view_profile_btn", !group_tab_active); buttonSetVisible("im_btn", !group_tab_active); buttonSetVisible("call_btn", !group_tab_active); @@ -750,7 +749,9 @@ void LLPanelPeople::updateButtons() is_friend = LLAvatarTracker::instance().getBuddyInfo(selected_id) != NULL; } - childSetEnabled("add_friend_btn", !is_friend); + LLPanel* cur_panel = mTabContainer->getCurrentPanel(); + if (cur_panel) + cur_panel->childSetEnabled("add_friend_btn", !is_friend); } buttonSetEnabled("teleport_btn", friends_tab_active && item_selected && isFriendOnline(selected_uuids.front())); diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 9fac7d34f7..a370b450e9 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -107,7 +107,10 @@ background_visible="true" name="add_friend_btn" top_delta="0" tool_tip="Add selected resident to your friends List" - width="18" /> + width="18"> + <commit_callback + function="People.addFriend" /> + </button> </panel> </panel> <panel @@ -325,7 +328,10 @@ background_visible="true" name="add_friend_btn" top_delta="0" tool_tip="Add selected resident to your friends List" - width="18" /> + width="18"> + <commit_callback + function="People.addFriend" /> + </button> </panel> </panel> </tab_container> |