diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index fea1989e7e..68bed8e54e 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -954,6 +954,7 @@ BOOL LLPanelProfileSecondLife::postBuild() mBlockButton = getChild("block"); mUnblockButton = getChild("unblock"); mAddFriendButton = getChild("add_friend"); + mRemoveFriendButton = getChild("remove_friend"); // Add "Remove Friend" button to profile mPayButton = getChild("pay"); mIMButton = getChild("im"); mOverflowButton = getChild("overflow_btn"); @@ -969,6 +970,7 @@ BOOL LLPanelProfileSecondLife::postBuild() mBlockButton->setCommitCallback([this](LLUICtrl*, void*) { onCommitMenu(LLSD("toggle_block_agent")); }, nullptr); mUnblockButton->setCommitCallback([this](LLUICtrl*, void*) { onCommitMenu(LLSD("toggle_block_agent")); }, nullptr); mAddFriendButton->setCommitCallback([this](LLUICtrl*, void*) { onCommitMenu(LLSD("add_friend")); }, nullptr); + mRemoveFriendButton->setCommitCallback([this](LLUICtrl*, void*) { onCommitMenu(LLSD("remove_friend")); }, nullptr); // Add "Remove Friend" button to profile mPayButton->setCommitCallback([this](LLUICtrl*, void*) { onCommitMenu(LLSD("pay")); }, nullptr); mIMButton->setCommitCallback([this](LLUICtrl*, void*) { onCommitMenu(LLSD("im")); }, nullptr); // @@ -1167,6 +1169,7 @@ void LLPanelProfileSecondLife::resetData() mTeleportButton->setVisible(!own_profile); mIMButton->setVisible(!own_profile); mAddFriendButton->setVisible(!own_profile); + mRemoveFriendButton->setVisible(!own_profile); // Add "Remove Friend" button to profile mBlockButton->setVisible(!own_profile); mUnblockButton->setVisible(!own_profile); mGroupList->setShowNone(!own_profile); @@ -1713,7 +1716,11 @@ void LLPanelProfileSecondLife::updateButtons() mTeleportButton->setEnabled(is_buddy_online && can_offer_tp); // //Disable "Add Friend" button for friends. - mAddFriendButton->setEnabled(false); + // Add "Remove Friend" button to profile + // mAddFriendButton->setEnabled(false); + mAddFriendButton->setVisible(false); + mRemoveFriendButton->setVisible(true); + // } else { @@ -1723,7 +1730,11 @@ void LLPanelProfileSecondLife::updateButtons() gRlvHandler.isException(RLV_BHVR_TPLURE, av_id, ERlvExceptionCheck::Permissive)); mTeleportButton->setEnabled(can_offer_tp); // - mAddFriendButton->setEnabled(true); + // Add "Remove Friend" button to profile + // mAddFriendButton->setEnabled(true); + mAddFriendButton->setVisible(true); + mRemoveFriendButton->setVisible(false); + // } // RLVa support diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index 691fcaae7a..57f4fba6d4 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -243,6 +243,7 @@ private: LLButton* mBlockButton; LLButton* mUnblockButton; LLButton* mAddFriendButton; + LLButton* mRemoveFriendButton; // Add "Remove Friend" button to profile LLButton* mPayButton; LLButton* mIMButton; LLMenuButton* mOverflowButton; diff --git a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml index 3ec9f988cc..999fb94ad0 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml @@ -670,6 +670,16 @@ layout="topleft" label_selected="Add Friend" /> +