summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationloglist.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2012-09-04 13:35:38 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2012-09-04 13:35:38 -0700
commit5c14f6e783c2581d0e4401d82581e7a5def99043 (patch)
tree579fe240496416f3c09ed7b9e29d1e06b0b2a570 /indra/newview/llconversationloglist.cpp
parent5fbb161ba0a28e64474efc295b12bccffdcdb0e0 (diff)
parent7bad109c3d7e6d70649839634586a09033cfb207 (diff)
merging in latest changes
Diffstat (limited to 'indra/newview/llconversationloglist.cpp')
-rw-r--r--indra/newview/llconversationloglist.cpp39
1 files changed, 34 insertions, 5 deletions
diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp
index 257ec082a5..d39e090c22 100644
--- a/indra/newview/llconversationloglist.cpp
+++ b/indra/newview/llconversationloglist.cpp
@@ -141,6 +141,28 @@ void LLConversationLogList::changed()
refresh();
}
+void LLConversationLogList::changed(const LLUUID& session_id, U32 mask)
+{
+ if (mask & LLConversationLogObserver::VOICE_STATE)
+ {
+ std::vector<LLPanel*> panels;
+ LLFlatListViewEx::getItems(panels);
+
+ std::vector<LLPanel*>::iterator iter = panels.begin();
+
+ for (; iter != panels.end(); ++iter)
+ {
+ LLConversationLogListItem* item = dynamic_cast<LLConversationLogListItem*>(*iter);
+
+ if (item && session_id == item->getConversation()->getSessionID() && !item->getConversation()->isConversationPast())
+ {
+ item->initIcons();
+ return;
+ }
+ }
+ }
+}
+
void LLConversationLogList::addNewItem(const LLConversation* conversation)
{
LLConversationLogListItem* item = new LLConversationLogListItem(&*conversation);
@@ -241,15 +263,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 +361,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;
}