summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationloglist.cpp
diff options
context:
space:
mode:
authorPaul ProductEngine <pguslisty@productengine.com>2012-08-31 11:57:36 +0300
committerPaul ProductEngine <pguslisty@productengine.com>2012-08-31 11:57:36 +0300
commitdab6788c42260135d298b619ff92a71838bba2b8 (patch)
treea2bfbd3c4338bd2b611017bc25062a9ddae54015 /indra/newview/llconversationloglist.cpp
parentab37263a5cda14227724181c771ac1d3ef55f467 (diff)
CHUI-157 FIXED (Implement menu bar for conversation floater)
- Added View Nearby chat history option - Also replaced menu item "Add Friend / Remove" with two separate menus: Add Friend and Remove Friend. So if user is a Friend the Remove Friend option would be shown there. If the user is not a friend, the Add Friend option would be shown.
Diffstat (limited to 'indra/newview/llconversationloglist.cpp')
-rw-r--r--indra/newview/llconversationloglist.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp
index 257ec082a5..94be9055bd 100644
--- a/indra/newview/llconversationloglist.cpp
+++ b/indra/newview/llconversationloglist.cpp
@@ -241,15 +241,18 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata)
{
LLAvatarActions::offerTeleport(selected_id);
}
- else if("add_rem_friend" == command_name)
+ else if("add_friend" == command_name)
{
- if (LLAvatarActions::isFriend(selected_id))
+ if (!LLAvatarActions::isFriend(selected_id))
{
- LLAvatarActions::removeFriendDialog(selected_id);
+ LLAvatarActions::requestFriendshipDialog(selected_id);
}
- else
+ }
+ else if("remove_friend" == command_name)
+ {
+ if (LLAvatarActions::isFriend(selected_id))
{
- LLAvatarActions::requestFriendshipDialog(selected_id);
+ LLAvatarActions::removeFriendDialog(selected_id);
}
}
else if ("invite_to_group" == command_name)
@@ -336,6 +339,10 @@ bool LLConversationLogList::isActionChecked(const LLSD& userdata)
{
return is_p2p && LLAvatarActions::isFriend(selected_id);
}
+ else if ("is_not_friend" == command_name)
+ {
+ return is_p2p && !LLAvatarActions::isFriend(selected_id);
+ }
return false;
}