summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpeople.cpp
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-18 10:04:08 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-18 10:04:08 +0200
commitda2a0cfceb9fbc7c66f23f8820309f36b6629530 (patch)
tree1a2c93b5d42bc87d79b9b53ea8f38673706d92e6 /indra/newview/llpanelpeople.cpp
parent471897cfabbfec8d4dbee65c837d5884310ea61a (diff)
parentc76ab6c4b7384e34a4f32f2fa820b46f6373cdc3 (diff)
Merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r--indra/newview/llpanelpeople.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index ca87ebf5a2..709525d4e2 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -54,6 +54,7 @@
#include "llfriendcard.h"
#include "llgroupactions.h"
#include "llgrouplist.h"
+#include "llinventoryobserver.h"
#include "llpanelpeoplemenus.h"
#include "llrecentpeople.h"
#include "llviewercontrol.h" // for gSavedSettings
@@ -447,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()
@@ -546,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));
@@ -706,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;
@@ -716,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);
@@ -749,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()));