summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpeople.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r--indra/newview/llpanelpeople.cpp58
1 files changed, 22 insertions, 36 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 44e860837e..e08179dd58 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -313,9 +313,9 @@ public:
mEventTimer.stop();
}
- virtual BOOL tick() // from LLEventTimer
+ virtual bool tick() // from LLEventTimer
{
- return FALSE;
+ return false;
}
};
@@ -367,9 +367,9 @@ public:
}
- /*virtual*/ BOOL tick()
+ /*virtual*/ bool tick()
{
- if (!mIsActive) return FALSE;
+ if (!mIsActive) return false;
if (mMask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE))
{
@@ -380,7 +380,7 @@ public:
mEventTimer.stop();
mMask = 0;
- return FALSE;
+ return false;
}
// virtual
@@ -508,10 +508,10 @@ public:
}
}
- /*virtual*/ BOOL tick()
+ /*virtual*/ bool tick()
{
update();
- return FALSE;
+ return false;
}
private:
};
@@ -577,6 +577,11 @@ LLPanelPeople::~LLPanelPeople()
delete mFriendListUpdater;
delete mRecentListUpdater;
+ mNearbyFilterCommitConnection.disconnect();
+ mFriedsFilterCommitConnection.disconnect();
+ mGroupsFilterCommitConnection.disconnect();
+ mRecentFilterCommitConnection.disconnect();
+
if(LLVoiceClient::instanceExists())
{
LLVoiceClient::getInstance()->removeObserver(this);
@@ -609,14 +614,14 @@ void LLPanelPeople::removePicker()
}
}
-BOOL LLPanelPeople::postBuild()
+bool LLPanelPeople::postBuild()
{
S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit();
- getChild<LLFilterEditor>("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
- getChild<LLFilterEditor>("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
- getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
- getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
+ mNearbyFilterCommitConnection = getChild<LLFilterEditor>("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
+ mFriedsFilterCommitConnection = getChild<LLFilterEditor>("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
+ mGroupsFilterCommitConnection = getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
+ mRecentFilterCommitConnection = getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
if(LLAgentBenefitsMgr::current().getGroupMembershipLimit() < max_premium)
{
@@ -729,7 +734,7 @@ BOOL LLPanelPeople::postBuild()
mOnlineFriendList->setRefreshCompleteCallback(boost::bind(&LLPanelPeople::onFriendListRefreshComplete, this, _1, _2));
mAllFriendList->setRefreshCompleteCallback(boost::bind(&LLPanelPeople::onFriendListRefreshComplete, this, _1, _2));
- return TRUE;
+ return true;
}
// virtual
@@ -831,7 +836,7 @@ void LLPanelPeople::updateNearbyList()
mNearbyList->setDirty();
DISTANCE_COMPARATOR.updateAvatarsPositions(positions, mNearbyList->getIDs());
- LLActiveSpeakerMgr::instance().update(TRUE);
+ LLActiveSpeakerMgr::instance().update(true);
}
void LLPanelPeople::updateRecentList()
@@ -887,7 +892,7 @@ void LLPanelPeople::updateButtons()
LLPanel* cur_panel = mTabContainer->getCurrentPanel();
if (cur_panel)
{
- if (cur_panel->hasChild("add_friend_btn", TRUE))
+ if (cur_panel->hasChild("add_friend_btn", true))
cur_panel->getChildView("add_friend_btn")->setEnabled(item_selected && !is_friend && !is_self);
if (friends_tab_active)
@@ -961,25 +966,6 @@ void LLPanelPeople::getCurrentItemIDs(uuid_vec_t& selected_uuids) const
}
-void LLPanelPeople::showGroupMenu(LLMenuGL* menu)
-{
- // Shows the menu at the top of the button bar.
-
- // Calculate its coordinates.
- // (assumes that groups panel is the current tab)
- LLPanel* bottom_panel = mTabContainer->getCurrentPanel()->getChild<LLPanel>("bottom_panel");
- LLPanel* parent_panel = mTabContainer->getCurrentPanel();
- menu->arrangeAndClear();
- S32 menu_height = menu->getRect().getHeight();
- S32 menu_x = -2; // *HACK: compensates HPAD in showPopup()
- S32 menu_y = bottom_panel->getRect().mTop + menu_height;
-
- // Actually show the menu.
- menu->buildDrawLabels();
- menu->updateParent(LLMenuGL::sMenuContainer);
- LLMenuGL::showPopup(parent_panel, menu, menu_x, menu_y);
-}
-
void LLPanelPeople::setSortOrder(LLAvatarList* list, ESortOrder order, bool save)
{
switch (order)
@@ -1184,11 +1170,11 @@ bool LLPanelPeople::isItemsFreeOfFriends(const uuid_vec_t& uuids)
void LLPanelPeople::onAddFriendWizButtonClicked()
{
LLPanel* cur_panel = mTabContainer->getCurrentPanel();
- LLView * button = cur_panel->findChild<LLButton>("friends_add_btn", TRUE);
+ LLView * button = cur_panel->findChild<LLButton>("friends_add_btn", true);
// Show add friend wizard.
LLFloater* root_floater = gFloaterView->getParentFloater(this);
- LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), FALSE, TRUE, FALSE, root_floater->getName(), button);
+ LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), false, true, false, root_floater->getName(), button);
if (!picker)
{
return;