diff options
author | Oz Linden <oz@lindenlab.com> | 2013-03-28 10:12:18 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-03-28 10:12:18 -0400 |
commit | 130e4e510198147664a2377b62b22d8e42f00f04 (patch) | |
tree | 14556a65468e06edcbf6f68c4b026fea16fcd070 /indra/newview/llfloaterimsessiontab.cpp | |
parent | 515f0e5a559ff3f0cb7d02e1d40b0f71425800ea (diff) | |
parent | cf1747712b154b6984cf374cf9c86f68a1210fb3 (diff) |
merge changes for 3.5.0-beta6
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.cpp')
-rw-r--r-- | indra/newview/llfloaterimsessiontab.cpp | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index eab2ce7798..5083331167 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -132,6 +132,12 @@ void LLFloaterIMSessionTab::setVisible(BOOL visible) LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container")->setVisible(true); } LLFloaterIMSessionTab::addToHost(mSessionID); + LLFloaterIMSessionTab* conversp = LLFloaterIMSessionTab::getConversation(mSessionID); + + if (conversp && conversp->isNearbyChat() && gSavedPerAccountSettings.getBOOL("NearbyChatIsNotCollapsed")) + { + onCollapseToLine(this); + } mInputButtonPanel->setVisible(isTornOff()); } @@ -356,7 +362,7 @@ void LLFloaterIMSessionTab::draw() // Restart the refresh timer mRefreshTimer->setTimerExpirySec(REFRESH_INTERVAL); } - + LLTransientDockableFloater::draw(); } @@ -698,10 +704,12 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar() && !mIsP2PChat; mParticipantListAndHistoryStack->collapsePanel(mParticipantListPanel, !is_participant_list_visible); + mParticipantListPanel->setVisible(is_participant_list_visible); // Display collapse image (<<) if the floater is hosted // or if it is torn off but has an open control panel. bool is_expanded = is_not_torn_off || is_participant_list_visible; + mExpandCollapseBtn->setImageOverlay(getString(is_expanded ? "collapse_icon" : "expand_icon")); mExpandCollapseBtn->setToolTip( is_not_torn_off? @@ -818,14 +826,15 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self) { if (!self->mIsP2PChat) { + // The state must toggle the collapsed state of the panel bool should_be_expanded = self->mParticipantListPanel->isCollapsed(); - // Expand/collapse the participant list panel - self->mParticipantListAndHistoryStack->collapsePanel(self->mParticipantListPanel, !should_be_expanded); - self->mParticipantListPanel->setVisible(should_be_expanded); + // Update the expand/collapse flag of the participant list panel and save it gSavedSettings.setBOOL("IMShowControlPanel", should_be_expanded); self->mIsParticipantListExpanded = should_be_expanded; - self->mExpandCollapseBtn->setImageOverlay(self->getString(should_be_expanded ? "collapse_icon" : "expand_icon")); + + // Refresh for immediate feedback + self->refreshConversation(); } } @@ -863,7 +872,7 @@ void LLFloaterIMSessionTab::reshapeFloater(bool collapse) enableResizeCtrls(true, true, true); } - + saveCollapsedState(); setShape(floater_rect, true); mBodyStack->updateLayout(); @@ -885,6 +894,7 @@ void LLFloaterIMSessionTab::restoreFloater() mBodyStack->updateLayout(); mExpandCollapseLineBtn->setImageOverlay(getString("expandline_icon")); setMessagePaneExpanded(true); + saveCollapsedState(); enableResizeCtrls(true, true, true); } } @@ -1060,6 +1070,14 @@ LLConversationItem* LLFloaterIMSessionTab::getCurSelectedViewModelItem() return conversationItem; } +void LLFloaterIMSessionTab::saveCollapsedState() +{ + LLFloaterIMSessionTab* conversp = LLFloaterIMSessionTab::getConversation(mSessionID); + if(conversp->isNearbyChat()) + { + gSavedPerAccountSettings.setBOOL("NearbyChatIsNotCollapsed", isMessagePaneExpanded()); + } +} BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask ) { if(mask == MASK_ALT) |