summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpeople.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-11-19 13:19:16 -0500
committerLoren Shih <seraph@lindenlab.com>2009-11-19 13:19:16 -0500
commit6cea252986ef6d33f2e37333a286362b8e0272c5 (patch)
treeec0e4d56a9dc2d8a97cc9bce4744b097f4b7efe4 /indra/newview/llpanelpeople.cpp
parent2b0a997b13de15c7aae009b52d7353c97e1781f3 (diff)
parent815f336a157cc33233633deed66634195d3dc552 (diff)
merge
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r--indra/newview/llpanelpeople.cpp9
1 files changed, 5 insertions, 4 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()));