diff options
author | Jonathan Yap <none@none> | 2013-11-19 16:56:17 -0500 |
---|---|---|
committer | Jonathan Yap <none@none> | 2013-11-19 16:56:17 -0500 |
commit | 410a084f9a2e030efda635f5a51280b599ab7f78 (patch) | |
tree | 2c2f095cee8cf0b233d59eee2c8d99ad68c44c70 /indra/newview/llfloaterimcontainer.cpp | |
parent | dad992ea31b6b823c316400e61d50d1aa9e52330 (diff) | |
parent | fcc885d4fc5ef63dad33e89a9324edc39d466d37 (diff) |
STORM-1980 Merge changes Oz made (new way of detecting an agent has changed regions)
Modify code to make use of the changed callback
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rwxr-xr-x | indra/newview/llfloaterimcontainer.cpp | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 90b4490e1d..b5aa309066 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -101,6 +101,7 @@ LLFloaterIMContainer::~LLFloaterIMContainer() gSavedPerAccountSettings.setBOOL("ConversationsListPaneCollapsed", mConversationsPane->isCollapsed()); gSavedPerAccountSettings.setBOOL("ConversationsMessagePaneCollapsed", mMessagesPane->isCollapsed()); + gSavedPerAccountSettings.setBOOL("ConversationsParticipantListCollapsed", !isParticipantListExpanded()); if (!LLSingleton<LLIMMgr>::destroyed()) { @@ -250,6 +251,11 @@ BOOL LLFloaterIMContainer::postBuild() // Init the sort order now that the root had been created setSortOrder(LLConversationSort(gSavedSettings.getU32("ConversationSortOrder"))); + //We should expand nearby chat participants list for the new user + if(gAgent.isFirstLogin() || !gSavedPerAccountSettings.getBOOL("ConversationsParticipantListCollapsed")) + { + expandConversation(); + } // Keep the xml set title around for when we have to overwrite it mGeneralTitle = getTitle(); @@ -715,6 +721,16 @@ void LLFloaterIMContainer::updateResizeLimits() assignResizeLimits(); } +bool LLFloaterIMContainer::isMessagesPaneCollapsed() +{ + return mMessagesPane->isCollapsed(); +} + +bool LLFloaterIMContainer::isConversationsPaneCollapsed() +{ + return mConversationsPane->isCollapsed(); +} + void LLFloaterIMContainer::collapseMessagesPane(bool collapse) { if (mMessagesPane->isCollapsed() == collapse) @@ -784,8 +800,8 @@ void LLFloaterIMContainer::collapseConversationsPane(bool collapse, bool save_is mConversationsPane->setTargetDim(gSavedPerAccountSettings.getS32("ConversationsListPaneWidth")); } - S32 delta_width = - gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") - mConversationsPane->getMinDim(); + S32 delta_width = gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") + - mConversationsPane->getMinDim() - mConversationsStack->getPanelSpacing() + 1; reshapeFloaterAndSetResizeLimits(collapse, delta_width); @@ -2086,6 +2102,19 @@ void LLFloaterIMContainer::expandConversation() } } } +bool LLFloaterIMContainer::isParticipantListExpanded() +{ + bool is_expanded = false; + if(!mConversationsPane->isCollapsed()) + { + LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(get_ptr_in_map(mConversationsWidgets,getSelectedSession())); + if (widget) + { + is_expanded = widget->isOpen(); + } + } + return is_expanded; +} // By default, if torn off session is currently frontmost, LLFloater::isFrontmost() will return FALSE, which can lead to some bugs // So LLFloater::isFrontmost() is overriden here to check both selected session and the IM floater itself @@ -2102,7 +2131,7 @@ BOOL LLFloaterIMContainer::isFrontmost() // For conversations, closeFloater() (linked to Ctrl-W) does not actually close the floater but the active conversation. // This is intentional so it doesn't confuse the user. onClickCloseBtn() closes the whole floater. -void LLFloaterIMContainer::onClickCloseBtn() +void LLFloaterIMContainer::onClickCloseBtn(bool app_quitting/* = false*/) { // Always unminimize before trying to close. // Most of the time the user will never see this state. @@ -2111,7 +2140,7 @@ void LLFloaterIMContainer::onClickCloseBtn() LLMultiFloater::setMinimized(FALSE); } - LLFloater::closeFloater(); + LLFloater::closeFloater(app_quitting); } void LLFloaterIMContainer::closeHostedFloater() @@ -2158,7 +2187,7 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) if(app_quitting) { closeAllConversations(); - onClickCloseBtn(); + onClickCloseBtn(app_quitting); } else { |