diff options
| author | Merov Linden <merov@lindenlab.com> | 2013-04-23 07:23:10 -0700 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2013-04-23 07:23:10 -0700 |
| commit | 54de43834c8b89e88db26441e5fe191547fb9e62 (patch) | |
| tree | 9ac5911e9821c1ab6f69731c83faee07f539d52e /indra/newview/llfloaterimcontainer.cpp | |
| parent | 244734647c38f256ace2d64fde4d3149d37e0e25 (diff) | |
| parent | 25c222e31770cb2c10e262b02ae9065521986349 (diff) | |
Pull merge from lindenlab/viewer-chui
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
| -rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 6a6b48cfb1..7519942901 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1165,7 +1165,7 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command, } else if("chat_history" == command) { - if (selectedIDS.size() > 0) + if (selectedIDS.size() > 0) { LLAvatarActions::viewChatHistory(selectedIDS.front()); } @@ -1178,6 +1178,17 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command, } } } + //if there is no LLFloaterIMSession* instance for selected conversation it might be Nearby chat + else + { + if(conversationItem->getType() == LLConversationItem::CONV_SESSION_NEARBY) + { + if("chat_history" == command) + { + LLFloaterReg::showInstance("preview_conversation", LLSD(LLUUID::null), true); + } + } + } } void LLFloaterIMContainer::doToSelected(const LLSD& userdata) @@ -1233,8 +1244,19 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) //Enable Chat history item for ad-hoc and group conversations if ("can_chat_history" == item && uuids.size() > 0) { - bool is_group = (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_GROUP); - return LLLogChat::isTranscriptExist(uuids.front(),is_group); + //Disable menu item if selected participant is user agent + if(uuids.front() != gAgentID) + { + if (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_NEARBY) + { + return LLLogChat::isNearbyTranscriptExist(); + } + else + { + bool is_group = (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_GROUP); + return LLLogChat::isTranscriptExist(uuids.front(),is_group); + } + } } // If nothing is selected(and selected item is not group chat), everything needs to be disabled |
