diff options
author | Merov Linden <merov@lindenlab.com> | 2012-10-08 18:22:48 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-10-08 18:22:48 -0700 |
commit | b9063e09fb2b90d14696911723dd3a46e3053ff8 (patch) | |
tree | e6f2e4aba3941b9a796f78137018cc5bbc8f1cfb /indra | |
parent | 0d619bcdc1fbb7869a6376749b0bd46b1d40c91e (diff) | |
parent | 93e36340ec895a44d0b0bc73157fe23279883863 (diff) |
Pull merge from richard/viewer-chui
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 7c5aaa7d0f..5f111b39d4 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -553,12 +553,25 @@ void LLIMFloaterContainer::collapseMessagesPane(bool collapse) gSavedPerAccountSettings.setBOOL("ConversationsExpandMessagePaneFirst", mConversationsPane->isCollapsed()); } + // Save left pane rectangle before collapsing/expanding right pane. + LLRect prevRect = mConversationsPane->getRect(); + // Show/hide the messages pane. mConversationsStack->collapsePanel(mMessagesPane, collapse); + if (!collapse) + { + // Make sure layout is updated before resizing conversation pane. + mConversationsStack->updateLayout(); + } + updateState(collapse, gSavedPerAccountSettings.getS32("ConversationsMessagePaneWidth")); + if (!collapse) + { + // Restore conversation's pane previous width after expanding messages pane. + mConversationsPane->setTargetDim(prevRect.getWidth()); + } } - void LLIMFloaterContainer::collapseConversationsPane(bool collapse) { if (mConversationsPane->isCollapsed() == collapse) @@ -888,7 +901,13 @@ void LLIMFloaterContainer::doToSelectedConversation(const std::string& command, } else if("chat_history" == command) { - LLAvatarActions::viewChatHistory(conversationItem->getUUID()); + const LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(conversationItem->getUUID()); + + if (NULL != session) + { + const LLUUID session_id = session->isOutgoingAdHoc() ? session->generateOutgouigAdHocHash() : session->mSessionID; + LLFloaterReg::showInstance("preview_conversation", session_id, true); + } } else { |