summaryrefslogtreecommitdiff
path: root/indra/llui/llscrolllistctrl.cpp
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-08-22 18:02:31 +0300
committermaxim_productengine <mnikolenko@productengine.com>2018-08-22 18:02:31 +0300
commit36594400a2ea20d7a404172c3ab6a01b0228a29d (patch)
tree956d89f497c06dd8f8166f44d0ee8d952e5dc63f /indra/llui/llscrolllistctrl.cpp
parente041ffc5ff7136ccb52b91b9ee05b18b46516283 (diff)
MAINT-8985 FIXED User is able to send friendship request to a friend from the group menu
Diffstat (limited to 'indra/llui/llscrolllistctrl.cpp')
-rw-r--r--indra/llui/llscrolllistctrl.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index ed65b1e45f..410436e3f2 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1836,6 +1836,19 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
menu_name, LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instance());
if (mPopupMenu)
{
+ if (mIsFriendSignal)
+ {
+ bool isFriend = *(*mIsFriendSignal)(uuid);
+ LLView* addFriendButton = mPopupMenu->getChild<LLView>("add_friend");
+ LLView* removeFriendButton = mPopupMenu->getChild<LLView>("remove_friend");
+
+ if (addFriendButton && removeFriendButton)
+ {
+ addFriendButton->setEnabled(!isFriend);
+ removeFriendButton->setEnabled(isFriend);
+ }
+ }
+
mPopupMenu->show(x, y);
LLMenuGL::showPopup(this, mPopupMenu, x, y);
return TRUE;
@@ -3110,3 +3123,11 @@ void LLScrollListCtrl::onFocusLost()
LLUICtrl::onFocusLost();
}
+boost::signals2::connection LLScrollListCtrl::setIsFriendCallback(const is_friend_signal_t::slot_type& cb)
+{
+ if (!mIsFriendSignal)
+ {
+ mIsFriendSignal = new is_friend_signal_t();
+ }
+ return mIsFriendSignal->connect(cb);
+}